i cant fix my enter and exit command.. - 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: i cant fix my enter and exit command.. (
/showthread.php?tid=573222)
i cant fix my enter and exit command.. -
IndependentGaming - 05.05.2015
this is my command,
PHP код:
CMD:exit(playerid,params[])
{
for(new i = 0; i < sizeof(DoorInfo); i++) {
if(IsPlayerInRangeOfPoint(playerid,3.0,DoorInfo[i][dExitX],DoorInfo[i][dExitY],DoorInfo[i][dExitZ])) {
SetPlayerPos(playerid, DoorInfo[i][dEnterX],DoorInfo[i][dEnterY],DoorInfo[i][dEnterZ]); SetPlayerInterior(playerid, DoorInfo[i][dEnterInt]); SetPlayerVirtualWorld(playerid, DoorInfo[i][dEnterVW]); }
{
if(DoorInfo[i][ddCustomInterior]) Player_StreamPrep(playerid, DoorInfo[i][dEnterX],DoorInfo[i][dEnterY],DoorInfo[i][dEnterZ], FREEZE_TIME);
}
return 1;
}
CMD:enter(playerid,params[])
{
for(new i = 0; i < sizeof(DoorInfo); i++) {
if(IsPlayerInRangeOfPoint(playerid,3.0,DoorInfo[i][dEnterX],DoorInfo[i][dEnterY],DoorInfo[i][dEnterZ])) {
SetPlayerPos(playerid, DoorInfo[i][dExitX],DoorInfo[i][dExitY],DoorInfo[i][dExitZ]); SetPlayerInterior(playerid, DoorInfo[i][dExitInt]); SetPlayerVirtualWorld(playerid, DoorInfo[i][dExitVW]); }
{
if(DoorInfo[i][ddCustomExterior]) Player_StreamPrep(playerid, DoorInfo[i][dEnterX],DoorInfo[i][dEnterY],DoorInfo[i][dEnterZ], FREEZE_TIME);
}
return 1;
}
Getting this errors:
PHP код:
(381) : warning 217: loose indentation
(387) : warning 217: loose indentation
(387) : error 029: invalid expression, assumed zero
C:\Users\Kevin\Desktop\Deathmatch Neo\filterscripts\DoorSys.pwn(387) : error 017: undefined symbol "cmd_enter"
(387) : error 029: invalid expression, assumed zero
(387) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
i think there is something wrong in the commands!
Re: i cant fix my enter and exit command.. -
Konstantinos - 05.05.2015
Extra opened bracket. Indenting your code properly so it'll be readable would be easier way to figure it out.
PHP код:
CMD:exit(playerid,params[])
{
for(new i = 0; i < sizeof(DoorInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,DoorInfo[i][dExitX],DoorInfo[i][dExitY],DoorInfo[i][dExitZ]))
{
SetPlayerPos(playerid, DoorInfo[i][dEnterX],DoorInfo[i][dEnterY],DoorInfo[i][dEnterZ]);
SetPlayerInterior(playerid, DoorInfo[i][dEnterInt]); SetPlayerVirtualWorld(playerid, DoorInfo[i][dEnterVW]);
}
if(DoorInfo[i][ddCustomInterior])
{
Player_StreamPrep(playerid, DoorInfo[i][dEnterX],DoorInfo[i][dEnterY],DoorInfo[i][dEnterZ], FREEZE_TIME);
}
}
return 1;
}