Need help with variables - 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: Need help with variables (
/showthread.php?tid=405511)
Need help with variables -
McFellow - 06.01.2013
Hello,
I have some errors with my variables and I don't really get how it works can some one explaint to to me?
Errors:
Код:
(126) : error 029: invalid expression, assumed zero
(154) : error 029: invalid expression, assumed zero
(154) : warning 215: expression has no effect
(154) : error 001: expected token: ";", but found ")"
(154) : error 029: invalid expression, assumed zero
(154) : fatal error 107: too many error messages on one line
Line126:
Код:
mysql_fetch_field_row(savingstring, "XPOS"); /*XPOS VARIABLE*/ = strval(savingstring);
Line 154:
Код:
format(query, sizeof(query), "UPDATE playerdata SET score=%d, money=%d, WHERE user='%s'", score, money,/*XPOS VARIABLE*/, pname);
Re: Need help with variables -
McFellow - 06.01.2013
Any one?
Re: Need help with variables -
Fabio11 - 06.01.2013
This
pawn Код:
mysql_fetch_field_row(savingstring, "XPOS"); /*XPOS VARIABLE*/ = strval(savingstring);
Should become
pawn Код:
mysql_fetch_field_row(savingstring, "XPOS");
PlayerInfo[playerid][xPos] = floatstr(savingstring);
// Assuming that 'PlayerInfo[playerid][xPos]'is the variable where you want to save that xPos
And you should replace every /*XPOS VARIABLE*/ with your actual variable...