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
Where
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: Where

(04-26-2013, 01:14 PM)Icaab2607 Wrote: void SanityDrain(string &in asTimer)
{
if(asTimer == "start_drain") return;
if(GetPlayerSanity() > 20) GiveSanityDamage(5, false);
AddTimer("drain_loop", 1, "SanityDrain");
}

You have an if that is not bracketed.
Try changing it to this:

PHP Code: (Select All)
void SanityDrain(string &in asTimer)
{
    if(
asTimer == "start_drain") return;
    if(
GetPlayerSanity() > 20
    {
    
GiveSanityDamage(5false);
    
AddTimer("drain_loop"1"SanityDrain");
    }


And also, in your 12th line, where it says
Quote:if(alState == -1)

You can make it "else". So it looks like this:

PHP Code: (Select All)
else(alState == -1

Discord: Romulator#0001
[Image: 3f6f01a904.png]
04-26-2013, 02:07 PM
Find


Messages In This Thread
Where - by Icaab2607 - 04-26-2013, 01:14 PM
RE: Where - by xxxxxxxxxxxxxxxx - 04-26-2013, 01:27 PM
RE: Where - by PutraenusAlivius - 04-26-2013, 01:45 PM
RE: Where - by Romulator - 04-26-2013, 02:07 PM
RE: Where - by Tomato Cat - 04-26-2013, 03:22 PM
RE: Where - by Icaab2607 - 04-28-2013, 08:55 AM
RE: Where - by Tomato Cat - 04-28-2013, 02:33 PM
RE: Where - by PutraenusAlivius - 04-28-2013, 02:39 PM
RE: Where - by Tomato Cat - 04-28-2013, 02:43 PM
RE: Where - by Icaab2607 - 04-28-2013, 06:18 PM



Users browsing this thread: 1 Guest(s)