[SOLVED]Quick thing about GetPlayerWantedLevel
#1

pawn Код:
if(GetPlayerWantedLevel(playerid) == > 5);
              {
                SetPlayerColor(playerid,COLOR_ORANGE);
            }

Код:
C:\Users\Braeden\Desktop\SAMP Server\gamemodes\SU.pwn(16509) : error 029: invalid expression, assumed zero
C:\Users\Braeden\Desktop\SAMP Server\gamemodes\SU.pwn(16509) : warning 215: expression has no effect
C:\Users\Braeden\Desktop\SAMP Server\gamemodes\SU.pwn(16509) : error 001: expected token: ";", but found ")"
C:\Users\Braeden\Desktop\SAMP Server\gamemodes\SU.pwn(16509) : error 029: invalid expression, assumed zero
C:\Users\Braeden\Desktop\SAMP Server\gamemodes\SU.pwn(16509) : fatal error 107: too many error messages on one line
Also how hilarious the error is keep it to yourself lol.
Reply
#2

Код:
if(GetPlayerWantedLevel(playerid) >= 5)
{
	SetPlayerColor(playerid, COLOR_ORANGE);
}
Reply
#3

try this

Код:
 if(GetPlayerWantedLevel(playerid) >= 5);
  {
    SetPlayerColor(playerid,COLOR_ORANGE);
   	}
Reply
#4

That means larger or equal to. I don't get why I cant just do greater than (also the one I posted was a mear attempt to fix the error. I did try just > but it gave errors. Regardless the error is fixed thank you.
Reply
#5

you can use just >. you had a semicolon on the end of the if statement which is why you had an error to start with.
Reply
#6

pawn Код:
if(GetPlayerWantedLevel(playerid) > 5) //Greater than 5, not equal to
{
    SetPlayerColor(playerid, COLOR_ORANGE);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)