Im having probplems with something please help! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Im having probplems with something please help! (
/showthread.php?tid=142795)
Im having probplems with something please help! -
BLAbla93 - 20.04.2010
ok so i wanted to make a teleport that freezes you and sets you in a diff virtual world so the vehicles wont load and it will give the map time to load on mapped objects. so i made this
Код:
G_Teleport(playerid, xpos, ypos, zpos)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), xpos, ypos, zpos);
TogglePlayerControllable(playerid, 0);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 10);
SetPlayerVirtualWorld(playerid, 10);
playerdata[playerid][xposition] = xpos;
playerdata[playerid][yposition] = ypos;
playerdata[playerid][zposition] = zpos;
SetTimerEx("UnFreezeVehicle", 5000, 0, "i", playerid);
return 1;
}
else
{
SetPlayerPos(playerid, xpos, ypos, zpos);
TogglePlayerControllable(playerid, 0);
SetPlayerVirtualWorld(playerid, 10);
SetTimerEx("UnFreeze", 5000, 0, "i", playerid);
return 1;
}
}
and i used the callback on my teleports command
Код:
G_Teleport(playerid, 1357.8088,-1845.0336,47.2175);
and i get these errors and it doesn't make any sense at all as i have playerid, and x and an y and a z
Код:
D:\...\gamemodes\GStunts.pwn(3829) : warning 213: tag mismatch
D:\...\gamemodes\GStunts.pwn(3829) : warning 213: tag mismatch
D:\...\gamemodes\GStunts.pwn(3829) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
all help is appreciated as i cant continue debugging without understanding why i am getting tag mismatch when there is not one :/
please mind the indentation errors its from copy pasting the code from my script to the forms
Re: Im having probplems with something please help! -
cessil - 20.04.2010
which line is 3829?
Re: Im having probplems with something please help! -
BLAbla93 - 20.04.2010
Код:
G_Teleport(playerid, 1357.8088,-1845.0336,47.2175);
is 3829
Re: Im having probplems with something please help! -
Calgon - 20.04.2010
Replace:
pawn Код:
G_Teleport(playerid, xpos, ypos, zpos)
{
with:
pawn Код:
G_Teleport(playerid, Float: xpos, Float: ypos, Float: zpos)
{
Re: Im having probplems with something please help! -
BLAbla93 - 20.04.2010
Fixed Thanks