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 crashes due to unexpected end in my .HPS file
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: Amnesia crashes due to unexpected end in my .HPS file

(06-28-2012, 11:35 PM)EddieShoe Wrote: It worked, thanks a lot! May I ask why this additional } is required on that func? I've never used 2 before, It's my first day using the scripts so I'm not that good at it :-)
I must start by saying WOW if thats your first try at scripting and you've already implemented if/else statements. Anyways:

For if/else statements, think of it as a function within a function (funception!).

void Function()
{

}

^^ That is the most basic function, adding the if/else statement takes it one step further, and 2 additional brackets need to be added in the same manner, like so:

void Function()
{
if(alState = 1)
{
//second part
}
}


Basically, there needs to be equal amounts of open "{" and closed "}" brackets for the script to work properly.

I rate it 3 memes.
06-28-2012, 11:39 PM
Find


Messages In This Thread
RE: Amnesia crashes due to unexpected end in my .HPS file - by Adny - 06-28-2012, 11:39 PM



Users browsing this thread: 1 Guest(s)