Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement error
Author Message
BeeKayK Online
Posting Freak

Posts: 1,952
Joined: Mar 2012
Reputation: 75
Post: #1
If statement error
My if-statement makes a strange error i cannot seem to solve.

What i want is (as to many others) for my door to display a message when it is locked.

I was going to test it out when this showed up:

FATAL ERROR: Could not load script file
'custom _stories/OE/custom_stories/OE/maps/D-Dur.hps'!
main(22, 11) : ERR :Expected ';'
main(30, 11) : ERR :Expected ';'


My script looks like this:


void OnStart()
{

SetEntityPlayerInteractCallback("V17_door", "V17_door", false);
SetEntityPlayerInteractCallback("V18_door", "V18_door", false);
}


18 void V17_door(string &in asEntity)
19 {
20 if(GetSwingDoorLocked("V17"))
21 {
22 SetMessage"Messages", "V17", 0); <- Look it is there!!
23 }
24 }
25

26 void V18_door(string &in asEntity)
27 {
28 if(GetSwingDoorLocked("V18"))
29 {
30 SetMessage"Messages", "V18", 0); <- It is also here!!
31 }
32 }

What is wrong here??


EDIT: And my message is here:

////////////////////////////MESSAGES

<CATEGORY Name="Messages">
<Entry Name="V17">Doeren er laast</Entry>
<Entry Name="V18">Doeren er laast</Entry>

</CATEGORY>

We fear what we cannot undo
We fear what we don't know
(This post was last modified: 03-31-2012 11:14 AM by BeeKayK.)
03-31-2012 11:12 AM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 939
Joined: Jul 2011
Reputation: 39
Post: #2
RE: If statement error
SetMessage"Messages", "V17", 0);

this is how it should look like

SetMessage("Messages", "V17", 0);

and the same with V18 you forgot the (

03-31-2012 11:24 AM
Find all posts by this user Quote this message in a reply
junkfood2121 Offline
Senior Member

Posts: 267
Joined: Jan 2011
Reputation: 3
Post: #3
RE: If statement error
Also, you did not define wether if the code shall check if the door is locked or not;

if(GetSwingDoorLocked("V18") == true/false)

May I present to you.. the Grunt Cannon:
http://www.youtube.com/watch?v=v9KjvvVzNNg
03-31-2012 11:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeeKayK Online
Posting Freak

Posts: 1,952
Joined: Mar 2012
Reputation: 75
Post: #4
RE: If statement error
AWESOME!!! It works! Big Grin Very much thanks you! You guys are awesome Big Grin

We fear what we cannot undo
We fear what we don't know
03-31-2012 11:51 AM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 939
Joined: Jul 2011
Reputation: 39
Post: #5
RE: If statement error
You're welcome Smile

03-31-2012 11:58 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)