Frictional Games Forum (read-only)

Full Version: main (8,9) : ERR :Expected identifer Fatal error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I got this Fatal Error that says this

FATAL ERROR: Could not load script file
'custom_stories/Cellar/maps/Somethingsoon.hps'!
main (8,9) : ERR : Expected identifer


My hps file looks like this

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_dungeon", "level_celler_1", UsedKeyOnDoor, true);
}

MyFunc(string &in asItem, string &in asEntity)
{
void SetSwingDoorLocked("level_celler_1", false, true);
void PlaySoundAtEntity("","unlock_door", "level_celler_1", 0, true);
RemoveItem(key_dungeon);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
-Steveblockenstein
(11-13-2012, 09:04 PM)Steveblockenstein Wrote: [ -> ]////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_dungeon", "level_celler_1", UsedKeyOnDoor, true);
}

MyFunc(string &in asItem, string &in asEntity)
{
void SetSwingDoorLocked("level_celler_1", false, true);
void PlaySoundAtEntity("","unlock_door", "level_celler_1", 0, true);
RemoveItem(key_dungeon);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
-Steveblockenstein
There's your problem.

It should be..

Quote:MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level_celler_1", false, true);
PlaySoundAtEntity("","unlock_door", "level_celler_1", 0, true);
RemoveItem(key_dungeon);
}


And BTW there's a forum for this.
What do you mean, there is a forum? He is in the right forum. Smile
(11-13-2012, 09:28 PM)beecake Wrote: [ -> ]What do you mean, there is a forum? He is in the right forum. Smile

That's 'cause i moved it to the right forum.
Aaah Big Grin
And:



////////////////////////////

// Run when entering map

void OnEnter()

{

AddUseItemCallback("", "key_dungeon", "level_celler_1", UsedKeyOnDoor, true);

}



UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("level_celler_1", false, true);

PlaySoundAtEntity("","unlock_door", "level_celler_1", 0, true);

RemoveItem("key_dungeon");

}

This should be right. Ctrl+C Ctrl+V it.
(11-13-2012, 10:06 PM)The chaser Wrote: [ -> ]UsedKeyOnDoor(string &in asItem, string &in asEntity)

It's been awhile since I did this, but shouldn't it be
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
?
(11-13-2012, 11:03 PM)Cranky Old Man Wrote: [ -> ]
(11-13-2012, 10:06 PM)The chaser Wrote: [ -> ]UsedKeyOnDoor(string &in asItem, string &in asEntity)

It's been awhile since I did this, but shouldn't it be
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
?
It's true, silly me Big Grin
(11-13-2012, 11:03 PM)Cranky Old Man Wrote: [ -> ]
(11-13-2012, 10:06 PM)The chaser Wrote: [ -> ]UsedKeyOnDoor(string &in asItem, string &in asEntity)

It's been awhile since I did this, but shouldn't it be
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
?
Oh, I missed that. =o