Dini error
#1

I am trying to get a giveadmin command to work exept it comes up with this error

Код:
D:\Downloads\Copy of samp03aasvr_R3_win32\gamemodes\UGFREEDM.pwn(762) : error 035: argument type mismatch (argument 3)
the command is

pawn Код:
dcmd_giveadmin(playerid, cmdtext[])
{
    new idx;
    new tmp[256];
        new string[256];
    tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_RED, "USAGE: /giveadmin [playerid/PartOfName] [level(1-4)]");
            return 1;
        }
        new sendername[MAX_PLAYER_NAME];
        new giveplayer[MAX_PLAYER_NAME];
        new para1;
        new admlvl;
        if(IsStringAName(tmp))
        {
            para1 = GetPlayerID(tmp);
        }
        else
        {
            para1 = strval(tmp);
        }
        tmp = strtok(cmdtext, idx);
        admlvl = strval(tmp);
        if(level[playerid] >= 4)
        {
          new file[256];
            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            dini_Set(file, "level", admlvl);
            printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, admlvl);
            format(string, sizeof(string), "  You have been promoted to a level %d admin by %s", admlvl, sendername);
            SendClientMessage(para1, COLOR_RED, string);
            format(string, sizeof(string), "  You have promoted %s to a level %d admin.", giveplayer,admlvl);
            SendClientMessage(playerid, COLOR_RED, string);
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "  you are not authorized to use that command!");
        }
return 1;
}
and if i set
Код:
dini_Set(file, "level", admlvl);
to
Код:
dini_IntSet(file, "level", admlvl);
It compile but does not set the level when i change it
Reply


Messages In This Thread
Dini error - by teddyman - 04.12.2009, 19:52
Re: Dini error - by Zamaroht - 04.12.2009, 19:57
Re: Dini error - by teddyman - 04.12.2009, 20:04
Re: Dini error - by Zamaroht - 04.12.2009, 22:21
Re: Dini error - by teddyman - 05.12.2009, 20:57
Re: Dini error - by Grim_ - 05.12.2009, 21:12
Re: Dini error - by teddyman - 05.12.2009, 21:24
Re: Dini error - by Grim_ - 05.12.2009, 21:25
Re: Dini error - by teddyman - 05.12.2009, 21:29
Re: Dini error - by Grim_ - 05.12.2009, 21:39

Forum Jump:


Users browsing this thread: 1 Guest(s)