SendClientMessage[please help] -
Josh_Main - 07.07.2012
I'm pretty sure this is really easy to fix, I just can't think properly it's like 1am where I am. After making a teleport command, I'm using SendClientMessage(playerid, COLOR_GREY, "Text here");
When I compile it, I get
error 021: symbol already defined: "SendClientMessage"
Re: SendClientMessage[please help] -
StrangeLove - 07.07.2012
Post the line that giving you errors.
Re: SendClientMessage[please help] -
.FuneraL. - 07.07.2012
SendClientMessage already defined? O.o, have define for the function?
Re: SendClientMessage[please help] -
Cxnnor - 07.07.2012
Post the line of the code you are getting errors on... You must of defined it already o.O
Re: SendClientMessage[please help] -
Josh_Main - 07.07.2012
Код HTML:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotoallsaints", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1201.29,-1325.50,13.40,0);
SendClientMessage(playerid, COLOR_GREY, "You have been teleported to All Saints General Hospital (Los Santos)")
return 1;
}
return 0;
}
Re: SendClientMessage[please help] -
ZBits - 07.07.2012
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotoallsaints", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1201.29,-1325.50,13.40);
SendClientMessage(playerid, COLOR_GREY, "You have been teleported to All Saints General Hospital (Los Santos)");
return 1;
}
return 0;
}
you missed a ; after SendClientMessage()
Re: SendClientMessage[please help] -
Cxnnor - 07.07.2012
pawn Код:
if (strcmp("/gotoallsaints", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1201.29,-1325.50,13.40,0);
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to All Saints General Hospital (Los Santos)");
return 1;
}
You forgot a declaration after SendClientMessage
Re: SendClientMessage[please help] -
Josh_Main - 07.07.2012
Thanks guys
Re: SendClientMessage[please help] -
ZBits - 07.07.2012
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotoallsaints", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1201.29,-1325.50,13.40);
SendClientMessage(playerid, COLOR_GREY, "You have been teleported to All Saints General Hospital (Los Santos)");
return 1;
}
return 0;
}
there was also a error:tag mismatch that was SetPlayerPos(posx,posy,posz,0); you added 0 for nothing
mine is the correct one
Re: SendClientMessage[please help] -
Josh_Main - 07.07.2012
Oh thank you alot