SA-MP Forums Archive
[Help]GetPlayerMoney Error's - 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: [Help]GetPlayerMoney Error's (/showthread.php?tid=97717)



[Help]GetPlayerMoney Error's - Mowgli - 16.09.2009

This is the line of code i am using, and its trying to check if the players money is less than 'gunprice'

Код:
else if(GetPlayerMoney(playerid) < gunprice)
This is the bit so you know what gunprice is:

Код:
 	  new gunprice;
		gunprice = buyingweapongunprice[playerid];
and then i get this error on the line and its very annoying

Код:
C:\Documents and Settings\Darren\Desktop\GTA San Andreas\samp02Xserver.win32\gamemodes\FFrp.pwn(1113) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Darren\Desktop\GTA San Andreas\samp02Xserver.win32\gamemodes\FFrp.pwn(1113) : warning 215: expression has no effect
C:\Documents and Settings\Darren\Desktop\GTA San Andreas\samp02Xserver.win32\gamemodes\FFrp.pwn(1113) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: [Help]GetPlayerMoney Error's - Abernethy - 16.09.2009

pawn Код:
else if(GetPlayerMoney(playerid) <= gunprice)
You forgot the = in <=


Re: [Help]GetPlayerMoney Error's - Mowgli - 16.09.2009

i dont need a '=' I did less than, not less than and equal to...

Also when i add a '=' it gets same errors


Re: [Help]GetPlayerMoney Error's - Abernethy - 16.09.2009

Ok then, what the fuck are you trying to do?


Re: [Help]GetPlayerMoney Error's - Mowgli - 16.09.2009

trying to get rid of the Error..


The point of this statement is to check if the player's Money is less than ( < ) the 'gunprice'.. but im getting this error


Re: [Help]GetPlayerMoney Error's - Abernethy - 16.09.2009

Why not #define the gunprice ?


Re: [Help]GetPlayerMoney Error's - Mowgli - 16.09.2009

i dnno, i just want this thing FIXED


Re: [Help]GetPlayerMoney Error's - Clavius - 16.09.2009

What's the line before the else if check?