martijnaikema
Warlord
- Joined
- Oct 30, 2010
- Messages
- 111
Hi,
I have a basic LUA-question. I have a LUA-function "CalculateTraitGold" which returns two values:
return iPlayerID
return iTraitGold
Say I have a new function "UpdateTraitGold" which needs to add the iTraitGold to the player with ID iPlayerID. How do I need to set this function?
Shoud it be:
function UpdateTraitGold ()
CalculateTraitGold()
iPlayerID:ChangeGold (iTraitGold)
end
And if I set the Serial Events, which function(s) should I add? I guess only the UpdateTraitGold-function? Because it calls the CalculateTraitGold-function?
I have a basic LUA-question. I have a LUA-function "CalculateTraitGold" which returns two values:
return iPlayerID
return iTraitGold
Say I have a new function "UpdateTraitGold" which needs to add the iTraitGold to the player with ID iPlayerID. How do I need to set this function?
Shoud it be:
function UpdateTraitGold ()
CalculateTraitGold()
iPlayerID:ChangeGold (iTraitGold)
end
And if I set the Serial Events, which function(s) should I add? I guess only the UpdateTraitGold-function? Because it calls the CalculateTraitGold-function?