01.07.2009, 19:11
OK, I'm trying to work out a simple teleport script, but I get a tag mismatch error. Here's the important chunk of the code:
I just started to program on PAWNO, so I can't do much. I also looked around this forum and many people got tag mismatch error, but not the way I got it.
Код:
Teleport(id_player, coord_x, coord_y, coord_z)
{
if(IsPlayerInAnyVehicle(id_player) == 1)
{
SetVehiclePos(GetPlayerVehicleID(id_player), coord_x, coord_y, coord_z);
}
else
{
SetPlayerPos(id_player, coord_x, coord_y, coord_z);
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/chilliad", cmdtext, true, 10) == 0)
{
GameTextForPlayer(playerid,"Welcome to Chilliad",4000,3);
Teleport(playerid, -2372.1711, -1601.2511, 498.4596); //The thing gives 3 tag mismatches on this line.
return 1;
}
}


os_x, etc. because coordinates are floats. that's what causes tag mismatch
... whatever