error 029: invalid expression, assumed zero - 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: error 029: invalid expression, assumed zero (
/showthread.php?tid=624453)
error 029: invalid expression, assumed zero -
danielpalade - 17.12.2016
-- DELETED --
Re: error 029: invalid expression, assumed zero -
BiosMarcel - 17.12.2016
Looks fine to me, except that you are calling "time_since_pvar(playerid, "newbie_timeout")" twice and you called one of your functions "S" which is terrible coding style.
Anyways, is the code that you sent even from "w_helpers.inc" or did you just misread the errors?
Re: error 029: invalid expression, assumed zero -
danielpalade - 17.12.2016
Quote:
Originally Posted by [Bios]Marcel
Looks fine to me, except that you are calling "time_since_pvar(playerid, "newbie_timeout")" twice and you called one of your functions "S" which is terrible coding style.
Anyways, is the code that you sent even from "w_helpers.inc" or did you just misread the errors?
|
Yea, it's from w_helpers. The function "S" is basically a function that automatically formats a string and sends the message. There is no problem at all there since I don't get any warning at all from the S function.
Re: error 029: invalid expression, assumed zero -
BiosMarcel - 17.12.2016
Quote:
Originally Posted by danielpalade
Yea, it's from w_helpers. The function "S" is basically a function that automatically formats a string and sends the message. There is no problem at all there since I don't get any warning at all from the S function.
|
The problem is the name "S", not the method itself , never give methods such stupid names, names should explain what the method does.
But like i said, the rest of the code seems like it should work (or am i to blind to see the mistake)?
Re: error 029: invalid expression, assumed zero -
danielpalade - 17.12.2016
Quote:
Originally Posted by [Bios]Marcel
The problem is the name "S", not the method itself , never give methods such stupid names, names should explain what the method does.
But like i said, the rest of the code seems like it should work (or am i to blind to see the mistake)?
|
Well I tried removing the S function, and indeed, it seems that that is the problem, but I don't know why.. I mean on the other parts of my gamemode where I used that, everything works fine..