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 with empty statement
Author Message
BeeKayK Offline
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #1
If with empty statement
i made an if statement, which should be all right

void OnStart()
{

SetEntityConnectionStateChangeCallback("lever_simple01_1", "PipeStart1_1");
SetEntityConnectionStateChangeCallback("lever_simple01_2", "PipeStart1_2");
}


void PipeStart1_1(string &in asEntity, int alState)
{
if(alState == 1)
{
AddLocalVarInt("PipeStart1", 1);

if(GetLocalVarInt("PipeStart1") == 2);
{
AddPlayerSanity(5.0f);
}
}
}

void PipeStart1_2(string &in asEntity, int alState)
{
if(alState == 1)
{
AddLocalVarInt("PipeStart1", 1);

if(GetLocalVarInt("PipeStart1") == 2);
{
AddPlayerSanity(5.0f);
}
}
}

But i get this error which i doesn't understand...

"If with empty statement"


What does this mean?

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
06-09-2012 09:50 PM
Find all posts by this user Quote this message in a reply
Apjjm Offline
Super Moderator

Posts: 444
Joined: Apr 2011
Reputation: 42
Post: #2
RE: If with empty statement
you have a semi-colon after your if statements:

if(GetLocalVarInt("PipeStart1") == 2);


You will need to remove that.

(This post was last modified: 06-09-2012 09:57 PM by Apjjm.)
06-09-2012 09:57 PM
Find all posts by this user Quote this message in a reply
BeeKayK Offline
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #3
RE: If with empty statement
Dangit! Thank you! It works!

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
06-09-2012 10:16 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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