SA-MP Forums Archive
Commands - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Commands (/showthread.php?tid=239177)



Commands - Alex_Obando - 13.03.2011

Can some one tell me how to repair this? this is for the IRC, Please help I want it to look like this:




Код:
irccmd_iban(conn, channel[], user[], params[])
{
    if(!ircIsOp(conn,channel,user)) return IrcSay(""IRC_AUTH_MSG"");

        new
                ID = strval(params),tString[128],
                Reason[64],PlayerName[24];

        GetPlayerName(ID,PlayerName,sizeof(PlayerName));

        if(!IsPlayerConnected(ID))
            return IrcSay ("USAGE: !iban [Playerid] [Reason]");

        if(sscanf(params, "dz", ID, Reason))
                return IrcSay ("USAGE: !iban [Playerid] [Reason]");

        format(tString,sizeof(tString),"You have been banned for %s",Reason);
        SendClientMessage(ID, 0xFF0000FF, tString);
        
        
        	new hour,minute,second,month,day,year;
			gettime(hour,minute,second);
			getdate(year,month,day);

        format(tString,sizeof(tString),"%s Banned %s Reason: %s || Ban Made on:%i/%i/%i %i:%i:%i ",user,PlayerName,Reason,month,day,year,hour,minute,second); ");
        IrcSay(tString);

        BanEx(ID, Reason);
        return 1;
          
      
}
PHP код:
C:\Users\Alex\Desktop\Bot\filterscripts\AUirc2.pwn(519) : error 037invalid string (possibly non-terminated string)
C:\Users\Alex\Desktop\Bot\filterscripts\AUirc2.pwn(519) : warning 215expression has no effect
C
:\Users\Alex\Desktop\Bot\filterscripts\AUirc2.pwn(519) : error 001expected token";"but found ")"
C:\Users\Alex\Desktop\Bot\filterscripts\AUirc2.pwn(519) : error 029invalid expressionassumed zero
C
:\Users\Alex\Desktop\Bot\filterscripts\AUirc2.pwn(519) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors




Re: Commands - MP2 - 13.03.2011

-removed-


Respuesta: Commands - Alex_Obando - 13.03.2011

?


Re: Commands - Tommy_Mandaz - 13.03.2011

Post line 519 of the script onto here...


Respuesta: Commands - Alex_Obando - 13.03.2011

Код:
format(tString,sizeof(tString),"%s Banned %s Reason: %s || Ban Made on:%i/%i/%i %i:%i:%i ",user,PlayerName,Reason,month,day,year,hour,minute,second); ");



Re: Commands - Tommy_Mandaz - 13.03.2011

Try to replace that with this:

Код:
format(tString,sizeof(tString),"%s Banned %s Reason: %s || Ban Made on:%i/%i/%i %i:%i:%i ",user,PlayerName,Reason,month,day,year,hour,minut e,second");



Respuesta: Commands - Alex_Obando - 13.03.2011

Its the same, Same errors :/


Re: Commands - admantis - 13.03.2011

pawn Код:
format(tString,sizeof(tString),"%s Banned %s Reason: %s || Ban Made on:%i/%i/%i %i:%i:%i ",user,PlayerName,Reason,month,day,year,hour,minute,second);



Re: Commands - mprofitt - 13.03.2011

Quote:
Originally Posted by Tommy_Mandaz
Посмотреть сообщение
Try to replace that with this:

Код:
format(tString,sizeof(tString),"%s Banned %s Reason: %s || Ban Made on:%i/%i/%i %i:%i:%i ",user,PlayerName,Reason,month,day,year,hour,minut e,second");
Код:
format(tString,sizeof(tString),"%s Banned %s Reason: %s || Ban Made on:%i/%i/%i %i:%i:%i ",user,PlayerName,Reason,month,day,year,hour,minute,second);
I think this is what he meant to say...


Re: Commands - admantis - 13.03.2011

Quote:
Originally Posted by mprofitt
Посмотреть сообщение
Код:
format(tString,sizeof(tString),"%s Banned %s Reason: %s || Ban Made on:%i/%i/%i %i:%i:%i ",user,PlayerName,Reason,month,day,year,hour,minute,second);
I think this is what he meant to say...
You can't have declarated values with spaces. Probably a typo; 'minut e' should be 'minute'.