...
unbanname = strval(tmp);
if(udb_Exists(unbanname)) { //5411
dUserSetINT(unbanname).("banned", 0); //5412
...
(5411) : error 035: argument type mismatch (argument 1) (5412) : error 035: argument type mismatch (argument 1)
Originally Posted by skynny
if(udb_Exists(unbanname)) need two ) becouse you open 2...
and i dont have ideo for other. |
Originally Posted by Jeffry
Okay, this is the non-working piece of my unbanname command.
Can anyone help me to fix the errors? I just worked more then 1 hour on it. pawn Код:
Код:
(5411) : error 035: argument type mismatch (argument 1) (5412) : error 035: argument type mismatch (argument 1) |
...
unbanname = strval(tmp);
...
unbanname = tmp;
dcmd_unbanname(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 4) {
new tmp[256], Index; tmp = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /unbanname [name]");
new adminname[MAX_PLAYER_NAME], string[128], unbanname;
unbanname = strval(tmp);
if(udb_Exists(unbanname)) {
dUserSetINT(unbanname).("banned", 0);
GetPlayerName(playerid, adminname, sizeof(adminname));
CMDMessageToAdmins(playerid,"UNBANNAME");
format(string,sizeof(string),"Server: %s has been unbanned by %s (ID: %d).",unbanname,adminname,playerid);
SendClientMessageToAll(green,string);
SaveToFile("UnBanLog",string);
print(string);
return 1;
} else return SendClientMessage(playerid, red, "ERROR: No player with this name.");
} 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");
}
Originally Posted by Jeffry
Lol, sorry, cant answer this, but here is the command.
pawn Код:
|
Originally Posted by Jeffry
Removing the strval?
|
dcmd_unbanname(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 4) {
new tmp[256], Index; tmp = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /unbanname [name]");
new adminname[MAX_PLAYER_NAME], string[128], unbanname[MAX_PLAYER_NAME];
unbanname = tmp;
if(udb_Exists(unbanname)) {
dUserSetINT(unbanname).("banned", 0);
GetPlayerName(playerid, adminname, sizeof(adminname));
CMDMessageToAdmins(playerid,"UNBANNAME");
format(string,sizeof(string),"Server: %s has been unbanned by %s (ID: %d).",unbanname,adminname,playerid);
SendClientMessageToAll(green,string);
SaveToFile("UnBanLog",string);
print(string);
return 1;
} else return SendClientMessage(playerid, red, "ERROR: No player with this name.");
} 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");
}
Originally Posted by Jeffry
Wohoooooooo!! Thank you so much!!!
It works!!!! Thank you!!!!!!!! |
Originally Posted by wafffllesss
Quote:
|