i'm woking on a custom story and i've ran into to problems to do with the map exiting doors
1: if its locked and needs to be opened with a key. the key dissapears but the door is still locked
2:when its not locked and i try opening it i get a fatal error thats says "ERR: no matching signatures to 'OnLeave()'
main(4,1):ERR: expected'{'."
i have no 'OnLeave()' in my HPS
help please?
(06-18-2012, 07:59 AM)Dutton Wrote: [ -> ]post your script
void OnStart()
{
AutoSave();
AddUseItemCallback("", "hubkey1", "hubdoor1", "hubunlock", true);
}
void hubunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("hubdoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "hubdoor1", 0, false);
RemoveItem("hubkey1");
}
tell me if there a prob
There seems to be no error in your script.
Did you name your key and door exactly the same as in the script?
Did you post the whole script in your hps file?
Try putting in:
Try deleting your map_cache file.
(06-18-2012, 08:54 AM)Dutton Wrote: [ -> ]Did you post the whole script in your hps file?
Try putting in:
Try deleting your map_cache file.
now it just says "expected '{'
should i try a new door?
or have a new key?
void OnStart()
{
AutoSave();
AddUseItemCallback("", "hubkey1", "hubdoor1", "hubunlock", true);
}
void hubunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("hubdoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "hubdoor1", 0, false);
RemoveItem("hubkey1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Try dat