/me command - 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: /me command (
/showthread.php?tid=460649)
/me command -
Strapz - 29.08.2013
Код:
// /me command
CMD:me(playerid, params[])
{
new action[200];
if(sscanf(params,"s[200]", action))return SendClientMessage(playerid, 0x33CCCC,"USAGE: /me [action]");
format(action, sizeof(action);"%s %s", GetName(playerid), action);
SendClientMessageToAll(0x66CC33, action);
}
Код:
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(596) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(596) : warning 215: expression has no effect
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(596) : warning 215: expression has no effect
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(596) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(596) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(596) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Can somebody tell me what is wrong in this ?
Re: /me command -
EiresJason - 29.08.2013
You have a semi-colon after 'sizeof(action)', instead of a comma.
pawn Код:
CMD:me(playerid, params[])
{
new action[200];
if(sscanf(params,"s[200]", action))return SendClientMessage(playerid, 0x33CCCC,"USAGE: /me [action]");
format(action, sizeof(action),"%s %s", GetName(playerid), action);
SendClientMessageToAll(0x66CC33, action);
return 1; //add this so it does not say 'Unknown server command'.
}
Re: /me command -
Luis- - 29.08.2013
format(action, sizeof(action), "%s %s", GetName(playerid), action);