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
fatal error! HELP
pewds..fan Offline
Junior Member

Posts: 11
Threads: 4
Joined: May 2013
Reputation: 0
#1
fatal error! HELP

HI EVERYONE! I´m having a proplem with my amnesia custom story..
when im trying to go trought my level door in my level 2 to 3 it just says
FATAL ERROR
EXECUTE STRING (1,9) : EXPECTED ')'


////////////////////////////
// Run first time starting map
void OnStart()
{

}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_1", "mansion_1", "UsedKeyOnLocked", true);
}

void UsedKeyOnLocked(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
AutoSave();
}



IF YOU CAN FIND THE MISTAKE IT WOULD HELP ME A LOT!
05-27-2013, 03:29 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#2
RE: fatal error! HELP

Can't see anything obviously wrong with that script - is that the script for level 3, or level 2?
If the error pops up when your going to level 3 from level 2, then the error will be in the script for level 3 as this kind of error will be caught when the scripts compile, which happens when the game loads a map

btw, this kind of thread should be made in the 'Development Support' sub-forum Smile

05-27-2013, 03:35 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: fatal error! HELP

I find nothing wrong except the fact that you might wanna move that to void OnStart(). Or perhaps this is not the full script. In case, give us the full one.

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-27-2013, 03:37 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#4
RE: fatal error! HELP

(05-27-2013, 03:43 PM)Robosprog Wrote: That wouldn't make any difference to how the script is executed other than it being activated sooner.

It would mean it is only ever executed once, anything in OnEnter will be executed as many times as you enter the level

05-27-2013, 03:48 PM
Find
pewds..fan Offline
Junior Member

Posts: 11
Threads: 4
Joined: May 2013
Reputation: 0
#5
RE: fatal error! HELP

this script for map 3 but i cant out my level 2 scrpt there too



BTW. soooorry for putting this to the wrong forum and i´ve just started making my 1st cs (this) and my maps are small and i suck at acripting so i dont have much scripts >.>
05-27-2013, 05:26 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#6
RE: fatal error! HELP

(05-27-2013, 03:29 PM)pewds..fan Wrote: HI EVERYONE! I´m having a proplem with my amnesia custom story..
when im trying to go trought my level door in my level 2 to 3 it just says
FATAL ERROR
EXECUTE STRING (1,9) : EXPECTED ')'


////////////////////////////
//Run first time starting map
void OnStart()
{

}

////////////////////////////
//Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_1", "mansion_1", "UsedKeyOnLocked", true);
}

void UsedKeyOnLocked(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0, false);
RemoveItem("key_1");
}

////////////////////////////
//Run when leaving map
void OnLeave()
{
AutoSave();
}



IF YOU CAN FIND THE MISTAKE IT WOULD HELP ME A LOT!

Try this script, maybe it works.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
05-27-2013, 06:36 PM
Find
amnesiaplayer321 Offline
Junior Member

Posts: 31
Threads: 4
Joined: May 2013
Reputation: 0
#7
RE: fatal error! HELP

post all 2 scripts names
05-27-2013, 07:33 PM
Find
amnesiaplayer321 Offline
Junior Member

Posts: 31
Threads: 4
Joined: May 2013
Reputation: 0
#8
RE: fatal error! HELP

void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_1", "UsedKeyOnLocked", true);
}

void UsedKeyOnLocked(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0, false);
RemoveItem("key_1");
}

void OnLeave()
{
AutoSave();
}
try this one.
(This post was last modified: 05-28-2013, 05:40 PM by amnesiaplayer321.)
05-28-2013, 05:39 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#9
RE: fatal error! HELP

That's the same code but arranged differently, so if there was a problem in the code, that wouldn't solve it. Regardless, he/she made another thread with more of the script an I think the problem was resolved there. Thanks anyway mate

05-28-2013, 05:44 PM
Find
amnesiaplayer321 Offline
Junior Member

Posts: 31
Threads: 4
Joined: May 2013
Reputation: 0
#10
RE: fatal error! HELP

i dont know, the script worked on my second test story.
05-28-2013, 05:47 PM
Find




Users browsing this thread: 1 Guest(s)