SA-MP Forums Archive
/goto error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /goto error (/showthread.php?tid=577112)



/goto error - Armageddonz - 09.06.2015

i get this error

Код:
C:\Users\Armageddon\Desktop\Samp Server RC6\gamemodes\Gamemode.pwn(502) : warning 213: tag mismatch
C:\Users\Armageddon\Desktop\Samp Server RC6\gamemodes\Gamemode.pwn(502) : warning 213: tag mismatch
C:\Users\Armageddon\Desktop\Samp Server RC6\gamemodes\Gamemode.pwn(502) : warning 213: tag mismatch
C:\Users\Armageddon\Desktop\Samp Server RC6\gamemodes\Gamemode.pwn(503) : warning 213: tag mismatch
C:\Users\Armageddon\Desktop\Samp Server RC6\gamemodes\Gamemode.pwn(503) : warning 213: tag mismatch
C:\Users\Armageddon\Desktop\Samp Server RC6\gamemodes\Gamemode.pwn(503) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Warnings.
on this line
Код:
	new float:X, float:Y, float:Z;
	GetPlayerPos(id, X, Y, Z);
	SetPlayerPos(playerid, X+1, Y+1, Z);
i think this the problem why my goto is bug up...it doesn't return me an error message when i try to goto myself even when i try to goto to player that is not connected,it will teleport me to a default coordinate(at farm)...

here's the whole command

Код:
CMD:goto(playerid, params[])
{
    new id, name[256], pname[256], string[256], pstring[256];
	if(sscanf(params, "i", id)) return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}[USAGE] /goto <id>");
	if(IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}[ERROR]The Player Is Not Connected");
 	if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}[ERROR]You Can't Teleport To Your Self");
	if(togglegoto[playerid] == 1) return SendClientMessage(playerid, 0xFF0000FF, "v{FFFFFF}[SYSTEM]{00CCFF}Your ToggleGoto Is OFF.You Can't GoTo To Other Player");
	if(togglegoto[id] == 1) return SendClientMessage(id, 0xFF0000FF, "v{FFFFFF}[SYSTEM] The Player Is Current Not Available.");
	GetPlayerName( playerid, name, sizeof(name));
	GetPlayerName( id, pname, sizeof(pname));
	format(string, sizeof(string), "{FFFFFF}[SYSTEM] {00CCFF}Teleported To %s(%i)", pname, id);
	format(string, sizeof(pstring), "{FFFFFF}[SYSTEM]{00CCFF}%s(%i) Has Teleport To You", name, playerid);
	SendClientMessage(id, 0x0, pstring);
	SendClientMessage(playerid, 0x0, string);
	new float:X, float:Y, float:Z;
	GetPlayerPos(id, X, Y, Z);
	SetPlayerPos(playerid, X+1, Y+1, Z);
	return 1;
}
i hope someone can help me




and one more thing..goto work when i try to connect to player that is available in my server...but it doesn't send a message to me either to player i want to goto..check my code


Respuesta: /goto error - JuanStone - 09.06.2015

Change bt:

Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(id, X, Y, Z);
SetPlayerPos(playerid, X+1, Y+1, Z);