SA-MP Forums Archive
Error fix (+rep) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error fix (+rep) (/showthread.php?tid=509224)



Error fix (+rep) - KillerStrike23 - 26.04.2014

pawn Код:
CMD:unban(playerid,params[]) {
    if(PlayerInfo[playerid][LoggedIn] == 1) {
        if(PlayerInfo[playerid][Level] >= 5) {
            new tmp[128], Index;        tmp = strtok(params,Index);
            if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unban [playername]");
            new player1, adminname[MAX_PLAYER_NAME], string[128], file[256];
            player1 = strval(tmp);
            if(!udb_Exists(player1) || dUserINT(player1).("banned") == 0) {
                format(file,256,"/ladmin/users/%s.sav",udb_encode(player1));
                GetPlayerName(playerid, adminname, sizeof(adminname));
                CMDMessageToAdmins(playerid,"UNBAN");
                format(string,sizeof(string),"%s has been banned by Administrator %s",player1,adminname);
                SaveToFile("UnBanLog",string);
                print(string);
                if(udb_Exists(player1) && dUserINT(player1).("banned") == 1) dUserSetINT(player1).("banned",0);
                format(string,sizeof(string),"Administrator %s has just unbanned %s", adminname, player1);
                return MessageToAdmins(white,string);
            } else return SendClientMessage(playerid,red, "The name you've chosen was not found in our database or maybe player is not banned");
        } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");}

Line (6630) : error 035: argument type mismatch (argument 1) : if(!udb_Exists(player1) || dUserINT(player1).("banned") == 0) {
Line (6631) : error 035: argument type mismatch (argument 1) : format(file,256,"/ladmin/users/%s.sav",udb_encode(player1));
Line (6637) : error 035: argument type mismatch (argument 1) : if(udb_Exists(player1) && dUserINT(player1).("banned") == 1) dUserSetINT(player1).("banned",0);

Line (6637) : error 035: argument type mismatch (argument 1) : if(udb_Exists(player1) && dUserINT(player1).("banned") == 1) dUserSetINT(player1).("banned",0);


Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: Error fix (+rep) - Equuuuin0X - 26.04.2014

have you used dudb include ?


Re: Error fix (+rep) - KillerStrike23 - 26.04.2014

lol yeah I did