PDA

View Full Version : SendClientMessage


RonnyCZ
02/08/2013, 07:16 AM
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 (c) 1997-2006, ITB CompuPhase


2 Warnings.

AIped
02/08/2013, 07:20 AM
you used the 'Body' value to much..try a different one at those error lines

Garwan50
02/08/2013, 07:58 AM
try replacing
sizeof string
by
sizeof(string)