SA-MP Forums Archive
Store a data value - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Store a data value (/showthread.php?tid=341123)



Store a data value - thimo - 09.05.2012

Hey i got a small problem. The problem is this:
pawn Код:
APlayerData[playerid][Money] = GetPlayerMoney(playerid);
My question is Will it store it in the APLayerData value or would it try to put it into GetPlayermoney?


Re: Store a data value - ViniBorn - 09.05.2012

How will you use it?


Re: Store a data value - JaTochNietDan - 09.05.2012

This piece of code will store the return value of GetPlayerMoney (which returns an integer based on the money the specified playerid has in-game) in the variable APlayerData in the 2nd dimension in the cell you specified using the enum "Money".


Re: Store a data value - thimo - 10.05.2012

WEll so why i get an error if i turn it around?


Re: Store a data value - Vince - 10.05.2012

Because assignments are always right-to-left.