#1

pawn Код:
new ID;
    new Level;
    if(sscanf(params, "dd[5]", ID, Level)) return SendClientMessage(playerid, 0x33AA33AA, "Usage: /setlevel [playerid] [Level]"); // error line
Error: " : error 035: argument type mismatch (argument 1)"

whats is the mistake, im making a simple setlevel cmd
Reply
#2

Nvm.
Reply
#3

acctually i started without that [5] and i used ii, later i tried with this. Fail
Reply
#4

Well the problem is that you've used a different datatype when handling ID or Level. I don't think the error is on this line, show me the full command instead.
Reply
#5

pawn Код:
CMD:setlevel (playerid, params)
{
    if (PlayerData [playerid] [ALevel] < 5 || !IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, 0xAFAFAFAA, "Server: Unknown Command");
        return 0;
    }
    new ID;
    new Level;
    if(sscanf(params, "dd", ID, Level))
       {
        SendClientMessage(playerid, 0x33AA33AA, "Usage: /setlevel [playerid] [Level]");
    }
        if(Level > 10 || Level < 0)
    {
        SendClientMessage(playerid, 0x33AA33AA, "Error:Select a Level between 0 an 10");
    }
    if(ID == INVALID_PLAYER_ID)
    {
        SendClientMessage(playerid, 0x33AA33AA, "Error:Player Not Connected");
    }
    PlayerData [ID] [ALevel] = Level;
    return 1;
}
im a nub. did Enum
Reply
#6

Quote:
Originally Posted by AlonzoTorres
Посмотреть сообщение
Well the problem is that you've used a different datatype when handling ID or Level. I don't think the error is on this line, show me the full command instead.
no datatypes. but yes, the error isn't coming from any of those lines.
Reply
#7

not even the one i posted above??
Reply
#8

Код:
CMD:setlevel (playerid, params[])
Reply
#9

Was just about to post, good hunt.
Reply
#10

facepalm. i forgot to add []
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)