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:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in Script file
jockelix Offline
Junior Member

Posts: 6
Threads: 3
Joined: Feb 2009
Reputation: 0
#1
Error in Script file

Hi, i am very new to scripting and when i try to open my level i get this error:

FATAL ERROR:could not load script file (points to my script)

main (16,8) : ERR : Expected ´(´


Can someone explain what is wrong?

void OnStart()
{
    if(ScriptDebugOn())
    {
        GiveItemFromFile("lantern", "lantern.ent");
        SetPlayerLampOil(100.0f);
        
        for(int i = 0;i < 10;i++)
        {
            GiveItemFromFile("tinderbox", "tinderbox.ent");
        }
            {    
                AddUseItemCallback("", "key_tower_1", "mansion_1", "KeyOnDoor", true);
            }

        void KeyOnDoor(string &in asItem, string &in asEntity)
        {
        SetSwingDoorLocked("mansion_1", false, true);
        PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
        }
    }
}
11-04-2010, 11:47 AM
Find


Messages In This Thread
Error in Script file - by jockelix - 11-04-2010, 11:47 AM
RE: Error in Script file - by Pandemoneus - 11-04-2010, 11:58 AM
RE: Error in Script file - by jockelix - 11-04-2010, 12:19 PM



Users browsing this thread: 1 Guest(s)