getting this to work

neetmaster

New Member
Reaction score
0
I'm completely new to the JASS scene and I don't really program. Can anyone fix my code here?

Code:
    if ( R2I(GetTimeOfDay()) > 20 or R2I(GetTimeOfDay()) < 4 == false ) then
    return false
    endif
    return true

Not sure on how to use OR, i only know &&
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
return GetFloatGameState(GAME_STATE_TIME_OF_DAY) > 4.0 and GetFloatGameState(GAME_STATE_TIME_OF_DAY) < 20.0

> Can anyone fix my code here?

You forgot to mention what the problem is.
(== false gets you a syntax error...)
 

neetmaster

New Member
Reaction score
0
oh fuck, yes no wonders why it doesnt work.

there "== false" in if()

thanks AceHart
Code:
   if ( GetTimeOfDay() > 20 or GetTimeOfDay() < 4 ) then
    return true
    endif
fixed to above
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top