Can YOU see the problem?
#1

Been up all night, think im tripping, cant see the easy problem to this HELP!

Код:
if(rank < 0 || > 16) return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER:{FFFFFF} No higher than 16 and lower than 0!");
Код:
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(3058) : error 029: invalid expression, assumed zero
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(3058) : warning 215: expression has no effect
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(3058) : error 001: expected token: ";", but found ")"
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(3058) : error 029: invalid expression, assumed zero
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(3058) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

i didnt check everything but try this:
pawn Код:
if(rank < 0 || rank > 16) {return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER:{FFFFFF} No higher than 16 and lower than 0!");}
Reply
#3

I think this will get it done :

if(rank < 0 || rank > 16) instead of if(rank < 0 || > 16)
Reply
#4

https://sampwiki.blast.hk/wiki/Control_Structures
Have a look here, you might find it helpful in some way.
Reply
#5

You're all wrong, his code is correct but rank is probably defined wrong somewhere else.
If you're making a command, try this:
pawn Код:
if(sscanf(params, "d", rank)) return SendClientMessage(playerid, -1, "{E74C3C}Syntax: /somecommand <rankid between 0 and 16>");
    if(rank< 0 || rank> 16) return SendClientMessage(playerid, -1, "{E74C3C}Error: Fill in an ID between 0 and 16!");
Ofcourse change the parameters.
Reply
#6

Well,i have tried what i posted it works,and i told him that i didnt check the code and also he only posted that line with errors i cant know what he has before it,so no need to decide and say things that are not true like saying all of us are wrong.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)