SA-MP Forums Archive
1 error simple help pls - 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: 1 error simple help pls (/showthread.php?tid=235264)



1 error simple help pls - Davz*|*Criss - 05.03.2011

Код:
C:\Users\GHAZANFAR\Desktop\SA-MP\filterscripts\Cmds.pwn(151) : error 029: invalid expression, assumed zero
C:\Users\GHAZANFAR\Desktop\SA-MP\filterscripts\Cmds.pwn(151) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
dcmd_me(playerid, params[])
{
	new message[128], str[128];
	if(sscanf(params, "s", message)) return 0xFFFF00AA(playerid, "DG Usage:- Type /Me (Text)");
	new pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pName, sizeof(pName));
	format(str, sizeof(str), "%s %s", pName, message);
	SendClientMessageToAll(0xFFFF00AA, str);
	return 1;
}



Re: 1 error simple help pls - Mean - 05.03.2011

Change.
pawn Код:
if(sscanf(params, "s", message)) return 0xFFFF00AA(playerid, "DG Usage:- Type /Me (Text)");
Change it to:
pawn Код:
if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, 0xFFFF00AA, "DG Usage:- Type /Me (Text)");
There is no
pawn Код:
0xFFFF00AA
function in sa-mp.


Re: 1 error simple help pls - xir - 05.03.2011

pawn Код:
dcmd_me(playerid, params[])

{
    new message[128], str[128];
    if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, 0xFFFF00AA, "DG Usage:- Type /Me (Text)");
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, sizeof(str), "%s %s", pName, message);
    SendClientMessageToAll(0xFFFF00AA, str);
    return 1;
}
EDIT: Too late


Re: 1 error simple help pls - Davz*|*Criss - 05.03.2011

thnx