Error is Trolling with me or what?
#1

Hey Guys, so i've been making Admin System, And Finished a Part, and got 1 Error:

Код:
C:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\RAdmin.pwn(148) : error 001: expected token: ")", but found "return"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And here's the code where the error is:

PHP код:
CMD:promote(playerid,params[])
{
    new 
id,level;
    if(
IsPlayerAdmin(playerid)) 
    {
148>>     if(sscanf(params,"ud",id,level) return SendClientMessage(playerid0xF8F8F8FFF,"[SERVER]: {FFFFFF}/promote [ID] [Level].");
        else
        {
            if(
level 5) return SendClientMessage(playerid0xF8F8F8FFF"[SERVER]: {FFFFFF}highest Level is 5.");
            else
            {
                new 
INI:File INI_Open(UserPath(id));
                
INI_WriteInt(File,"Admin",level);
                
INI_Close(File);
            }
        }
    }
    else
    {
        
SendClientMessage(playerid0xf8F8F8FFF,"[SERVER]: {FFFFFF}You are not RCON Admin to Access to This Command!");
    }
    return 
1;

i have tried a lot to fix and ain't fixing please help!
Reply
#2

Код:
if(sscanf(params,"ud",id,level) return SendClientMessage(playerid, 0xF8F8F8FFF,"[SERVER]: {FFFFFF}/promote [ID] [Level].");
You forgot a bracket.
Код:
if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid, 0xF8F8F8FFF,"[SERVER]: {FFFFFF}/promote [ID] [Level].");
EDIT: Vince has a better answer below.
Reply
#3

Код:
if(sscanf(params,"ud",id,level) return
          ^____________________^
  ^_____________________________^ ?
It's really not that hard.
Reply
#4

Quote:

if(sscanf(params,"ud",id,level))
Bold text.
Reply
#5

Lmao, Thanks didn't Noticed... Thanks GoldenLion + Vince!

Edit: And iLearner.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)