The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Amnesia Editor Unexpected { error
AnnoyingIB Offline
Junior Member

Posts: 2
Threads: 1
Joined: Feb 2012
Reputation: 0
#1
Amnesia Editor Unexpected { error

Hi!

I've started to make my own map in amnesia editor. But when I start it I get a meassage:

FATAL ERROR: Could not load script file 'custom_stories/The User/Maps/The User.hps'!
main (15,1): ERR : Unexpected token '{'
main (24,1): ERR : Unexpected token '{'
I've acctually seen a thread like this that solves the problem. But I didn't get what to do.
So here's the script:
____________________________________________________
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Bedroomkey_1", "Bedroom_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Bedroom_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Bedroom_1", 0, false);
RemoveItem("Bedroomkey_1");
}
{ *I think that it is this one that makes the (15,1) problem**
AddEntityCollideCallback("Player", "Area1", "CollideArea1", true, 1);
}
void CollideArea1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
}
{ *And also this one could be the (24,1) problem.*
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "AreaHelp", "CollideAreaHelp", false, 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}
////////////////////////////
// Run when entering map
void OnEnter ()
{
}
////////////////////////////
// Run when leaving map
void OnLeave ()
{
}
____________________________________________________

Any ideas? Other reflections of the script?

(This post was last modified: 02-04-2012, 05:19 PM by AnnoyingIB.)
02-04-2012, 11:46 AM
Find


Messages In This Thread
Amnesia Editor Unexpected { error - by AnnoyingIB - 02-04-2012, 11:46 AM
RE: Amnesia Editor Unexpected { error - by Khyrpa - 02-04-2012, 12:42 PM



Users browsing this thread: 1 Guest(s)