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
Expcected Error help!
FoodOnCrack Offline
Junior Member

Posts: 5
Threads: 3
Joined: Feb 2014
Reputation: 0
#3
RE: Expcected Error help!

(02-14-2014, 01:14 AM)Mudbill Wrote: First off, you can only have 1 script block with the same name (for example OnStart). Having multiple will cause a crash. If you need more script inside your OnStart block, just add it all inside the same one.

For example:
void OnStart()
{
    code1();
    code2();
}

Secondly, you can not have a callback script outside a block. This line:

AddUseItemCallback(" ", "key_tower_1", "castle_1", "KeyOnDoor", true);

is located between 2 blocks, therefore causing a crash as well. You want to move this within your OnStart block.

Try that and tell me how it goes. I'll assist further if you need more help (that is, if I can cause I'm about to go to bed. If I can't, there are many others here).



Thanks a lot! I have learned way more from scripting since i started a few weeks ago. I also use Geany now instead of Notepad++. A guy on youtube called ThisIsYourComputer has a good tutorial on how to set up geany for amnesia scripting.
02-23-2014, 07:45 PM
Find


Messages In This Thread
Expcected Error help! - by FoodOnCrack - 02-14-2014, 01:05 AM
RE: Expcected Error help! - by Mudbill - 02-14-2014, 01:14 AM
RE: Expcected Error help! - by FoodOnCrack - 02-23-2014, 07:45 PM
RE: Expcected Error help! - by Daemian - 02-24-2014, 12:24 AM
RE: Expcected Error help! - by Romulator - 02-24-2014, 08:50 AM
RE: Expcected Error help! - by Mudbill - 02-24-2014, 08:58 AM
RE: Expcected Error help! - by davide32 - 02-24-2014, 02:02 PM



Users browsing this thread: 1 Guest(s)