PDA

View Full Version : Exit house command


-Shifty-
03/06/2013, 01:31 PM
Hello Everyone,

I've downloaded a house script because I can't make one by myself (I am a beginner) I am trying to make an exit house command but I cant find how to:
// This function is used to spawn back at the entrance of your house
command:exit(playerid,HouseID)
House_Exit(playerid, HouseID)
{
// Set the player in the normal world again
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
// Set the position of the player at the entrance of his house
SetPlayerPos(playerid, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]);
// Also clear the tracking-variable to track in which house the player is
APlayerData[playerid][CurrentHouse] = 0;

// Check if there is a timer-value set for exiting the house (this timer freezes the player while the environment is being loaded)
if (ExitHouseTimer > 1000)
{
// Don't allow the player to fall
TogglePlayerControllable(playerid, 0);
// Let the player know he's frozen for 5 seconds
GameTextForPlayer(playerid, "Waiting for the environment to load", ExitHouseTimer, 4);
// Start a timer that will allow the player to fall again when the environment has loaded
SetTimerEx("House_ExitTimer", ExitHouseTimer, false, "ii", playerid, HouseID);
}

return 1;
}

C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2676) : error 020: invalid symbol name ""

I am a beginner so I don't know much about pawno etc.

Hopefully someone can help me out.

SimpalK
03/06/2013, 01:34 PM
Which is Line number 2676?

-Shifty-
03/06/2013, 01:35 PM
Which is Line number 2676?

command:exit(playerid,HouseID)

kosa451
03/06/2013, 01:37 PM
Try this one?

CMD:exitarena(playerid, params[])

kosa451
03/06/2013, 01:39 PM
sorry wrong code

CMD:exit(playerid, params[])

-Shifty-
03/06/2013, 01:44 PM
Gives me more errors:
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(733) : error 017: undefined symbol "DialogSellHouse"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(1796) : error 017: undefined symbol "DialogSellHouse"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(1832) : error 017: undefined symbol "House_Exit"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2095) : error 017: undefined symbol "House_Exit"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2677) : error 017: undefined symbol "House_Exit"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2680) : error 021: symbol already defined: "SetPlayerVirtualWorld"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2683) : error 021: symbol already defined: "SetPlayerPos"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2685) : error 010: invalid function or declaration
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2688) : error 010: invalid function or declaration
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2691) : error 021: symbol already defined: "TogglePlayerControllable"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2693) : error 021: symbol already defined: "GameTextForPlayer"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2695) : error 021: symbol already defined: "SetTimerEx"
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(2698) : error 010: invalid function or declaration
C:\Users\eigenaar\Documenten\Pawno\filterscripts\U ntitled.pwn(3220) : warning 203: symbol is never used: "ExitHouseTimer"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


13 Errors.

-Shifty-
03/06/2013, 08:54 PM
Anyone knows the solution??

DobbysGamertag
03/06/2013, 08:57 PM
You can't bump until 24 hours. Define your dialogs. Remove the stuff that has more than one of, such as commands, or symbols etc. Make sure there's correct closing braces, indenting properly helps.

EDIT: this looks like PPC_Housing. correct?

DeMoX
03/06/2013, 08:58 PM
We can't judge, we must see all the script.
And it looks that errors aren't on that part of the script.

DobbysGamertag
03/06/2013, 08:59 PM
We can't judge, we must see all the script.

Not entirely correct. He should post the relevant sections.

DeMoX
03/06/2013, 09:03 PM
Not entirely correct. He should post the relevant sections.
And could you say why SetPlayerVirtualWorld/SetPlayerPos/TogglePlayerControllable....etc are already defined?

-Shifty-
03/06/2013, 09:06 PM
You can't bump until 24 hours. Define your dialogs. Remove the stuff that has more than one of, such as commands, or symbols etc. Make sure there's correct closing braces, indenting properly helps.

EDIT: this looks like PPC_Housing. correct?



Yes this is PPC but if I remove those things nothing works...

DobbysGamertag
03/06/2013, 09:13 PM
Yes this is PPC but if I remove those things nothing works...

I thought it already had an exit house command?

-Shifty-
04/06/2013, 04:47 AM
I thought it already had an exit house command?



No it has /housemenu > exit I want to make a cmd of that...