My first zcmd command.. ONE error.
#1

pawn Код:
//This is the command
command(givememoney, playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        if(!isnull(params))
        {
/*This Is line 208*/            GivePlayerMoney(playerid,params)
        }
        else
        {
            SendClientMessage(playerid,COLOR_FADE1,"USAGE: /givememoney [amount]");
        }
    }
    else
    {
    SendClientMessage(playerid,COLOR_FADE4,"You are not an Admin!");
    }
    return 1;
}
Код:
D:\VERY IMPORTANT STUFF\SA-MP Scripts\Testing\gamemodes\MTS.pwn(208) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

pawn Код:
command(givememoney, playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        if(!isnull(params))
        {
            new amount = strval(params);
            GivePlayerMoney(playerid, amount);
        }
        else
        {
            SendClientMessage(playerid,COLOR_FADE1,"USAGE: /givememoney [amount]");
        }
    }
    else
    {
        SendClientMessage(playerid,COLOR_FADE4,"You are not an Admin!");
    }
    return 1;
}
You're trying to give yourself a string - that's not right!
Reply
#3

Thanks very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)