cmd unban help -
KillerStrike23 - 25.04.2014
pawn Код:
CMD:unban(playerid,params[]){
if(PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid, red, "ERROR: You must be logged in to use this commands");
if(PlayerInfo[playerid][Level] >= 5) return SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command");
new tname[24],filestring[79];
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unban [playername]");
format(filestring, sizeof(filestring), "/ladmin/users/%s.save", tname);
if(!udb_Exists(tname(filestring)) return SendClientMessage(playerid,red, "The name you've chosen was not found in our database");
CMDMessageToAdmins(playerid,"UNBAN");
if(udb_Exists(tname(filestring)) udb_encode(tname(filestring));
if(dUserINT(tname(filestring)).("banned") == 1) dUserSetINT(tname(filestring)).("banned",0);
new done[128];
format(done, sizeof(done),"Player %s has been unbanned", tname);
SaveToFile("UnBanLog",done);
SendClientMessage(playerid, white,done);
return 1;}
here is the errors I got :
(6629) : error 012: invalid function call, not a valid address
(6629) : warning 215: expression has no effect
(6629) : error 001: expected token: ";", but found ")"
(6629) : error 029: invalid expression, assumed zero
(6629) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Line 6629: if(!udb_Exists(tname(filestring)) return SendClientMessage(playerid,red, "The name you've chosen was not
Re: cmd unban help -
Bingo - 25.04.2014
Deleted.
Re: cmd unban help -
KillerStrike23 - 25.04.2014
I did but nah same error ...
Re: cmd unban help -
KillerStrike23 - 25.04.2014
so any other suggestions ?
Re : cmd unban help -
S4t3K - 25.04.2014
tname is an empty array.
I mean since you've created tname, I've never seen GetPlayerName anywhere in your code.
Moreover, I don't use udb system. If this doesn't matter for udb that an empty array is used, i'm sorry for my useless post.
Re : cmd unban help -
Ramoboss - 25.04.2014
pawn Код:
new name[MAX_PLAYERS_NAME];
tname = GetPlayerName(playerid, name, sizeof(name));
Re: cmd unban help -
KillerStrike23 - 25.04.2014
dude don't worry, but can you gemme an unban cmd for udb am just homeless :/
Re : cmd unban help -
Ramoboss - 25.04.2014
Quote:
Originally Posted by Ramoboss
pawn Код:
new name[MAX_PLAYERS_NAME]; tname = GetPlayerName(playerid, name, sizeof(name));
|
TRY MY SOLUTION --'
Re : cmd unban help -
Ramoboss - 25.04.2014
Quote:
Originally Posted by Ramoboss
pawn Код:
new name[MAX_PLAYERS_NAME]; tname = GetPlayerName(playerid, name, sizeof(name));
|
TRY MY SOLUTION DUDE --'
EDIT: sorry for double post, fucking mouse !
Re: cmd unban help -
KillerStrike23 - 25.04.2014
(6627) : warning 219: local variable "name" shadows a variable at a preceding level
(6627) : error 017: undefined symbol "MAX_PLAYERS_NAME"
(6627) : error 009: invalid array size (negative, zero or out of bounds)
(6627) : error 036: empty statement
(6627) : fatal error 107: too many error messages on one line
........................