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



SendClientMessage - RonnyCZ - 02.08.2013

Код:
new Body[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{   /*new string[128],body[128];
	format(string,sizeof(string),"%s",("body",playerid));
	ShowPlayerDialog(playerid, body, DIALOG_STYLE_MSGBOX,"body",playerid, string, "Ok", "Esc");*/
	new string[128],Body[128];
	format(string,sizeof string,"Body hrбče %s - %d",Jmeno(playerid),Body[playerid]);
	SendClientMessageToAll(0xFFFFFFAA,string);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
	new string[128],Body[150];
	format(string,sizeof string,"Body hrбče %s - %d",Jmeno(playerid),Body[playerid]);
	SendClientMessageToAll(0xFFFFFFAA,string);
    SetPlayerPos(playerid,1905.1967,937.9476,10.8347);
    return 1;
}
Errors :

Код:
C:\Documents and Settings\Ronny\Plocha\zk.pwn(215) : warning 219: local variable "Body" shadows a variable at a preceding level
C:\Documents and Settings\Ronny\Plocha\zk.pwn(228) : warning 219: local variable "Body" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.



Re: SendClientMessage - AIped - 02.08.2013

you used the 'Body' value to much..try a different one at those error lines


Re : SendClientMessage - Garwan50 - 02.08.2013

try replacing
pawn Код:
sizeof string
by
pawn Код:
sizeof(string)