5 errors for a 10 letter line?? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 5 errors for a 10 letter line?? (
/showthread.php?tid=89100)
5 errors for a 10 letter line?? -
Antonio [G-RP] - 30.07.2009
Heres the code... Im not sure if i did It right...
Код:
SetPlayerHealth(playerid, += 15);
Heres the errors....
Код:
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(7899) : error 029: invalid expression, assumed zero
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(7899) : warning 215: expression has no effect
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(7899) : error 001: expected token: ";", but found ")"
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(7899) : error 029: invalid expression, assumed zero
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(7899) : fatal error 107: too many error messages on one line
Help Pl0X !!
Re: 5 errors for a 10 letter line?? -
woot - 30.07.2009
pawn Код:
SetPlayerHealth(playerid, GetPlayerHealth(playerid)+15);
Re: 5 errors for a 10 letter line?? -
Jefff - 30.07.2009
Код:
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health+15.0);
Re: 5 errors for a 10 letter line?? -
D3nnis - 30.07.2009
If you would make an incudefile with a function like this in it, it would be a lot easier:
pawn Код:
stock GivePlayerHealth(playerid, ammount)
{
new Float:phealth;
GetPlayerHealth(playerid, phealth);
SetPlayerHealth(playerid, phealth + ammount);
return 1;
}
Then you could use
pawn Код:
GivePlayerHealth(playerid, 15);
and finished!
Just a suggestion
Re: 5 errors for a 10 letter line?? -
Antonio [G-RP] - 30.07.2009
Cool denis! Thanks, and
Thanks jeff it worked, but now from my food menu, this error appears
Код:
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(24077) : warning 219: local variable "drink" shadows a variable at a preceding level
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(28976) : warning 203: symbol is never used: "EatMenu"
Re: 5 errors for a 10 letter line?? -
Antonio [G-RP] - 30.07.2009
Okay I fixed the EatMenu error...