Jump to content
  • 0

Problema


Jack

Question

[pawn]D:\SERVER~1\GAMEMO~1\Test.pwn(704) : error 017: undefined symbol "ban"

D:\SERVER~1\GAMEMO~1\Test.pwn(706) : error 017: undefined symbol "Pi"

D:\SERVER~1\GAMEMO~1\Test.pwn(706) : error 017: undefined symbol "Level"

D:\SERVER~1\GAMEMO~1\Test.pwn(706) : error 029: invalid expression, assumed zero

D:\SERVER~1\GAMEMO~1\Test.pwn(706) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

5 Errors.

[/pawn]

Comanda:

[pawn]CMD:ban( playerid,params[])

{

if(Pi[Level]<5||!IsPlayerAdmin(playerid))return SendError(playerid,"Nu esti admin level 5 " );

if( sscanf( params,"uis[50]",params[0],params[1],params[2]))return SendUsage(playerid,"/ban <ID> <Expired(days)> <reason>"),SendUsage(playerid,"La Expired poti pune 0 pentru a expira in veci!");

if( !IsPlayerConnected( params[0] ) )return SendClientMessage( playerid,~0,"Userul nu este conectat" );

new

id,expired[50],

d,m,y

;

mysql_query("SELECT * FROM `bans`" );

    mysql_store_result();

id = mysql_num_rows()+1;

mysql_free_result();

//else format(expired,50,"%d",0);

getdate(y,m,d);

if(d+params[1]>30)

{

    while(d+params[1]>30)

    {

m++;

if(m==12)

m=0,y++;

params[1]-=30;

}

d=params[1];

format(expired,50,"%d/%d/%d",y,m,d);

}

else

    format(expired,50,"%d/%d/%d",y,m,d+params[1]);

getdate(y,m,d);

new str[200];

format(str,200,"INSERT INTO `bans` (`id`,`name`,`IP`,`Reason`,`Expired`,`BannedBy`,`Date`) VALUES ('%d','%s','%s','%s','%s','%s','%d/%d/%d')",id,ReturnName(params[0]),ReturnIP(params[0]),params[2],expired,ReturnName(playerid),d,m,y);

mysql_query(str);

format(str,200,"Ati primit ban de la Adminul {FFFFFF}%s{FF0000} cu motivul: %s",ReturnName(playerid),params[2]);

SendClientMessage(params[0],Color:Red,str);

format(str,1200,"Banul a fost primit pe {FFFFFF}IP-ul:%s{FF0000} in data de:{FFFFFF}%d/%d/%d",ReturnIP(params[0]),d,m,y);

SendClientMessage(params[0],Color:Red,str);

if(strlen(expired)<3)

format(str,200,"Este al {FFFFFF}%d{FF0000} ban.NU VA EXPIRA",id);

else

    format(str,200,"Este al {FFFFFF}%d{FF0000} ban si va expira pe %s",id,expired);

  SendClientMessage(params[0],Color:Red,str);

  SendClientMessage(params[0],Color:Red,"Puteti face o cerere de scoatere a banului pe adresa: {FFFFFF}sa-mp.ro/forum");

  SendClientMessage(params[0],Color:Yellow,"========================================================================");

format(str,200,"Banat de catre %s in data de %d/%d/%d",ReturnName(playerid),d,m,y);

SetTimerEx("KickEx",1000,0,"is",params[0],str);

return 1;

}[/pawn]

tumblr_ll5sj3LUoZ1qgjpfvo1_250.gif
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.