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
How to make two scripts? Need help!
giacomo9 Offline
Junior Member

Posts: 37
Threads: 11
Joined: Nov 2012
Reputation: 0
#1
How to make two scripts? Need help!

I want to create two different script in my .hps file, but when I running a map, game shows fatal error:
main (12,1): ERR: Unexpected token '{'
main (17,1): ERR: Unexpected token '{'

What's wrong with it? Please, help. Could you explain how to make different scripts and, if you have time, fix those two? (to example how make scripts). Btw, sorry for my (maybe) bad English Big Grin
Here's a script:

////////////////////////////
// Run when starting map
void OnStart()
{
AddUseItemCallback("", "basementkey_1", "basement_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("basement_1", false, true);
PlaySoundAtEntity("", "unlock_door", "basement_1", 0, false);
}
{
AddEntityCollideCallback("Player", "tp_1", "DeadOne", true, 1);
}

void DeadOne(string &in asParent, string &in asChild, int alStates);
{
SetEntityActive("GhostOne", true);
AddPropForce("GhostOne", 0, 0, -10000, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "GhostOne", 0, false);
}



////////////////////////////
// Run when entering map
void OnEnter()
{

}


////////////////////////////
// Run when leaving map
void OnLeave()
{

}
11-18-2012, 11:38 AM
Find


Messages In This Thread
How to make two scripts? Need help! - by giacomo9 - 11-18-2012, 11:38 AM



Users browsing this thread: 2 Guest(s)