SA-MP Forums Archive
Problem with PVars - 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: Problem with PVars (/showthread.php?tid=163731)



Problem with PVars - Ash. - 28.07.2010

Im having some problems with a "PVar". Here is my code:

pawn Код:
rand == GetPVarInt(strlen(thing), "PlayerMission");
however when i go to compile, i get the following error:

Код:
C:\Users\MyUserNameHere :) \SA-MP Stuff!\filterscripts\newwork.pwn(190) : warning 215: expression has no effect
What is wrong? If you need me to post the whole script let me know

Thanks
Ash


Re: Problem with PVars - lameguy - 28.07.2010

You have two times =.
So use
pawn Код:
rand = GetPVarInt(strlen(thing), "PlayerMission");
or if you want is at condition use
pawn Код:
if(rand == GetPVarInt(strlen(thing), "PlayerMission")) {...



Re: Problem with PVars - Ash. - 28.07.2010

Ah, thanks