Basic teleporting. -
BigGroter - 10.11.2011
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotolp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xaa3333a, "You have been teleported to LP!");
SetPlayerPos(playerid,-247.7184,2692.8208,62.6875);
return 1;
}
if (strcmp("/gotoarea", cmdtext, true, 10) == 0)
{
SendClientMessage,0xaa3333a, "You have been teleported to AREA 51.");
SetPlayerPos(playerid,207.0423,1906.9733,17.6406);
return 1;
}
return 0;
I get these errors;
Untitled.pwn(99) : error 076: syntax error in the expression, or invalid function call
Untitled.pwn(99) : error 029: invalid expression, assumed zero
Untitled.pwn(99) : warning 215: expression has no effect
Line 99 is this one " SendClientMessage,0xaa3333a, "You have been teleported to AREA 51."); "
Re: Basic teleporting. -
SmiT - 10.11.2011
Well, you forget a bracket and playerid parameter on your sendclientmessage function from your second command -
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotolp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xaa3333a, "You have been teleported to LP!");
SetPlayerPos(playerid,-247.7184,2692.8208,62.6875);
return 1;
}
if (strcmp("/gotoarea", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xaa3333a, "You have been teleported to AREA 51.");
SetPlayerPos(playerid,207.0423,1906.9733,17.6406);
return 1;
}
return 0;
}
Re: Basic teleporting. -
Tigerkiller - 10.11.2011
dont mean
and next time use the pawn tags
Re: Basic teleporting. -
BigGroter - 10.11.2011
Oh dear God, am I retarded? Haha, thanks!