Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
main (8,9) : ERR :Expected identifer Fatal error
Steveblockenstein Offline
Junior Member

Posts: 1
Threads: 1
Joined: Nov 2012
Reputation: 0
#1
main (8,9) : ERR :Expected identifer Fatal error

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
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#2
RE: main (8,9) : ERR :Expected identifer Fatal error

(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.

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
(This post was last modified: 11-13-2012, 09:10 PM by Tomato Cat.)
11-13-2012, 09:09 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: main (8,9) : ERR :Expected identifer Fatal error

What do you mean, there is a forum? He is in the right forum. Smile

Trying is the first step to success.
11-13-2012, 09:28 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: main (8,9) : ERR :Expected identifer Fatal error

(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.

Tutorials: From Noob to Pro
11-13-2012, 09:33 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: main (8,9) : ERR :Expected identifer Fatal error

Aaah Big Grin

Trying is the first step to success.
11-13-2012, 09:39 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#6
RE: main (8,9) : ERR :Expected identifer Fatal error

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.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-13-2012, 10:06 PM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#7
RE: main (8,9) : ERR :Expected identifer Fatal error

(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)
?

Noob scripting tutorial: From Noob to Pro

11-13-2012, 11:03 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#8
RE: main (8,9) : ERR :Expected identifer Fatal error

(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

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-13-2012, 11:17 PM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#9
RE: main (8,9) : ERR :Expected identifer Fatal error

(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

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
11-13-2012, 11:52 PM
Find




Users browsing this thread: 1 Guest(s)