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
EddieShoe Offline
Junior Member

Posts: 28
Threads: 6
Joined: Sep 2010
Reputation: 0
#7
RE: Amnesia crashes due to unexpected end in my .HPS file

(06-28-2012, 11:39 PM)andyrockin123 Wrote:
(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.
Thanks, that was very helpful! I realized that when you said it, there was something familiar in RPG Maker VX which I used before, the "condition branch". May I be rude and ask for another thing? I've tried googling it myself but with no results.

When the bookshelf rotates, it rotates, obviously. But it's empty so the secret is so obvious! If I put books in it they stand still while it rotates, as expected. So I tried using the "ConnectedProps" thingie but nothing happened there either. Any suggestions? I'm searching myself at the moment, but any help is much appreciated!

(Dunno if I can ask Off-Topic questions here, if so tell me. This is a new problem.)

Currently working on: "Awake"
Progress: ~5%
(This post was last modified: 06-29-2012, 12:05 AM by EddieShoe.)
06-28-2012, 11:52 PM
Find


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



Users browsing this thread: 1 Guest(s)