pewds..fan
Junior Member
Posts: 11
Threads: 4
Joined: May 2013
Reputation:
0
|
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 |
|
Adrianis
Senior Member
Posts: 620
Threads: 6
Joined: Feb 2012
Reputation:
27
|
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
|
|
05-27-2013, 03:35 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
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 |
|
Adrianis
Senior Member
Posts: 620
Threads: 6
Joined: Feb 2012
Reputation:
27
|
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 |
|
pewds..fan
Junior Member
Posts: 11
Threads: 4
Joined: May 2013
Reputation:
0
|
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 |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
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)
Aculy iz dolan.
|
|
05-27-2013, 06:36 PM |
|
amnesiaplayer321
Junior Member
Posts: 31
Threads: 4
Joined: May 2013
Reputation:
0
|
RE: fatal error! HELP
post all 2 scripts names
|
|
05-27-2013, 07:33 PM |
|
amnesiaplayer321
Junior Member
Posts: 31
Threads: 4
Joined: May 2013
Reputation:
0
|
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.
|
|
05-28-2013, 05:39 PM |
|
Adrianis
Senior Member
Posts: 620
Threads: 6
Joined: Feb 2012
Reputation:
27
|
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 |
|
amnesiaplayer321
Junior Member
Posts: 31
Threads: 4
Joined: May 2013
Reputation:
0
|
RE: fatal error! HELP
i dont know, the script worked on my second test story.
|
|
05-28-2013, 05:47 PM |
|
|