SA-MP Forums Archive
wanted level - 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: wanted level (/showthread.php?tid=87002)



wanted level - Pawno_Master - 17.07.2009

Hello,

I have a problem with my wantedlevel

i get 2 warnings

Код:
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(1479) : warning 211: possibly unintended assignment
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(1482) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
the meaning of my script is that cops can't get wanted and all other people can

this is my script

Код:
 	if(gTeam[killerid] = !TEAM_COPS) {
  SetPlayerWantedLevel(killerid, newlevel);
 	SetPlayerWantedLevel(playerid, 0);}
 	if(gTeam[killerid] = TEAM_COPS) {
  SetPlayerWantedLevel(killerid, 0);
  SetPlayerWantedLevel(playerid, newlevel);}
these my old and newlevel variables

Код:
	new oldlevel;
 	new newlevel;
 	oldlevel = GetPlayerWantedLevel(killerid);
  	newlevel = oldlevel + 2;
What's the problem?



Re: wanted level - Donny_k - 17.07.2009

You have a "= !" which should be "!=" then a "=" which should be a "==".

Take a look on the Wiki for more information about operators or check the pdf.


Re: wanted level - Pawno_Master - 17.07.2009

lol stupid mistake i am blind xD

thanks


Re: wanted level - Donny_k - 17.07.2009

No problemo.