Question about a command
#7

Quote:
Originally Posted by GiamPy.
Посмотреть сообщение
If you use sscanf, this is how it should be.

pawn Код:
CMD:setlevel(playerid,params[])
{
    new userid, level;
   
    if(sscanf(params, "ui", userid, level)
        return SendClientMessage(playerid, -1, "/setlevel [playerid/partofname] [level]");
       
    if(!IsPlayerConnected(userid))
        return SendClientMessage(playerid, -1, "The user is offline.");
       
    SetPlayerScore(userid, GetPlayerScore(userid)+level);
    SendClientMessage(playerid, COLOR_RED, "The level has been set.");
    return 1;
}
I used this code and tried to compile it, but I got this error:

Код:
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(376) : error 001: expected token: ")", but found "return"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply


Messages In This Thread
Question about a command - by K9IsGodly - 02.01.2014, 17:40
Re: Question about a command - by GiamPy. - 02.01.2014, 17:46
Re: Question about a command - by Hansrutger - 02.01.2014, 17:47
Re: Question about a command - by K9IsGodly - 02.01.2014, 17:48
Re: Question about a command - by Hansrutger - 02.01.2014, 17:52
Re: Question about a command - by GiamPy. - 02.01.2014, 17:55
Re: Question about a command - by K9IsGodly - 02.01.2014, 17:55
Re: Question about a command - by GiamPy. - 02.01.2014, 17:59
Re: Question about a command - by K9IsGodly - 02.01.2014, 18:11

Forum Jump:


Users browsing this thread: 7 Guest(s)