SA-MP Forums Archive
Help! - 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: Help! (/showthread.php?tid=300099)



Help! - Kostas' - 28.11.2011

What is wrong in that line. On the filterscript, it compiles without errors. But I wanted to add it on the Admin System and got this errors at line 301
pawn Код:
IRC_GroupSayEx(gGroupID, IRC_ECHO_CHANNEL, "7[disconnect] 3%s (%d) has left the server (Timeout).", playerName(playerid), playerid);
pawn Код:
error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line



Re: Help! - IceCube! - 28.11.2011

Ypu must format a string then place it in the IRC print out...

pawn Код:
format(string, sizeof(string), "7[disconnect] 3%s (%d) has left the server (Timeout).", playerName(playerid), playerid);



Re: Help! - Kostas' - 28.11.2011

Still with this same errors.
pawn Код:
new string[128];
            format(string, sizeof(string), "7[disconnect] 3%s (%d) has left the server (Timeout).", playerName(playerid), playerid);
            IRC_GroupSayEx(gGroupID, IRC_ECHO_CHANNEL, string);
I am sure that the wrong is here
pawn Код:
playerName(playerid), playerid
But I have the stock for this.
pawn Код:
stock playerNick(playerid)
{
    new pname[24];
    GetPlayerName(playerid, pname, 24);
    return pname;
}



Re: Help! - IceCube! - 28.11.2011

... Change PLayerName to PlayerNick? > YOur stock function