SendClientMessage[please help]
#1

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"
Reply
#2

Post the line that giving you errors.
Reply
#3

SendClientMessage already defined? O.o, have define for the function?
Reply
#4

Post the line of the code you are getting errors on... You must of defined it already o.O
Reply
#5

Код 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;
}
Reply
#6

Код:
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()
Reply
#7

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
Reply
#8

Thanks guys
Reply
#9

Код:
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
Reply
#10

Oh thank you alot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)