12-21-2011, 03:06 PM
well i am trying to make a custom story and found some tutorials on youtube but when i want to start my story i get an error it says:
FATAL ERROR: could not load script (folder name and where the text file is)
main 15.1: ERR : Unexpected token ''{''
And that's it
So in my .HPS file i have these scipts
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback('''', ''deurkey_1'', ''deur'', ''UsedKeyOnDoor'', True);
AddEntityCollideCallback(''Player'', ''doorclose'', ''Collidedeur'', true, 1);
}
void doorclose(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked(''deur'', true, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity) ;
{
SetSwingDoorLocked(''deur'', false, true);
PlaySoundAtEntity('''', ''unlock_door'', ''deur'', ''0'', false);
RemoveItem(deurkey_1);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
PLS anyone help me it would be great!
FATAL ERROR: could not load script (folder name and where the text file is)
main 15.1: ERR : Unexpected token ''{''
And that's it
So in my .HPS file i have these scipts
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback('''', ''deurkey_1'', ''deur'', ''UsedKeyOnDoor'', True);
AddEntityCollideCallback(''Player'', ''doorclose'', ''Collidedeur'', true, 1);
}
void doorclose(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked(''deur'', true, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity) ;
{
SetSwingDoorLocked(''deur'', false, true);
PlaySoundAtEntity('''', ''unlock_door'', ''deur'', ''0'', false);
RemoveItem(deurkey_1);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
PLS anyone help me it would be great!