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
Help with variable ints!
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: Help with variable ints!

(03-19-2014, 12:16 PM)Mudbill Wrote: It is missing one at the bottom:
PHP Code: (Select All)
void ContainerOnBarrelCheck()
{
    if(
GetLocalVarInt("Clean") == 1)
    {
        
//WHAT TO DO IF BARREL IS ALREADY CLEANED
    
}

    else if(
GetLocalVarInt("DirtyContainer") != 1)
    {
        
//WHAT TO DO IF BARREL HAVEN'T CLEANED YET
    
}
}
//<- this one 

Remember that any opening brace needs a closing brace. If you see an odd number of braces, something's missing.

By the way, you could just leave it as "else" without the second if statement. It would ultimately do the same thing, just be a bit shorter.

I just noticed you use a different name for the two variables in the check. Is this intentional? Because it was the same originally.

Tbh I use else if's because if I want if a VarInt is 2 or 1 or 0, more than one.

Also, you need to put this into the OnStart section.
PHP Code: (Select All)
SetLocalVarInt("BarrelCheck"0); 

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 03-19-2014, 01:04 PM by PutraenusAlivius.)
03-19-2014, 01:02 PM
Find


Messages In This Thread
Help with variable ints! - by Radical Batz - 03-19-2014, 10:05 AM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 10:24 AM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 10:38 AM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 12:16 PM
RE: Help with variable ints! - by PutraenusAlivius - 03-19-2014, 01:02 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 01:23 PM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 01:40 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 01:57 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 02:26 PM



Users browsing this thread: 1 Guest(s)