Errors when doing healcost = 100; - 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: Errors when doing healcost = 100; (
/showthread.php?tid=407218)
Errors when doing healcost = 100; -
101 - 13.01.2013
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "return"
This is what is causing it:
new healcost;
healcost = 100;
Why does this happen?
Re: Errors when doing healcost = 100; -
LarzI - 13.01.2013
The last error has nothing to do with the two lines you just posted. Can you show us the rest of that code?
Re: Errors when doing healcost = 100; -
101 - 13.01.2013
healcost = 100;
if(GetPlayerMoney(otherplayer) < healcost)) return SendClientMessage(playerid, COLOR_RED, "he does not have enough money!");
Its all on the same line. (all the errors/warnings), its something to do with healcost =
Re: Errors when doing healcost = 100; -
LarzI - 13.01.2013
You have one extra ')' - remove it.
Re: Errors when doing healcost = 100; -
101 - 13.01.2013
One of the times that I feel so stupid lol. Thanks Larz.
Re: Errors when doing healcost = 100; -
LarzI - 13.01.2013
Hehe, happens the best.