Sign in to follow this  
Followers 0
CounterCraft

[Basic help] how to compare two statement at once

2 posts in this topic

#1 ·  Posted (edited)

I have this function where I need program to execute line when its before 4:00PM and after 9:00PM

Func ask4pass()

while $limithour < 16 or > 21

$answer = inputbox ("Time Over", "Please type password or prepare to be shutdown", "", "*", "", "", "", "", 60)

if $bypass = $answer then

Exit

Else

shutdown (5)

EndIf

EndFunc

I get syntax error if I use or statement.... any idea?

EDIT

ok nvm I got it working

Func ask4pass()

while $limithour < 16 or $limithour > 21

$answer = inputbox ("Time Over", "Please type password or prepare to be shutdown", "", "*", "", "", "", "", 60)

if $bypass = $answer then

Exit

Else

shutdown (5)

EndIf

WEnd

EndFunc

Edited by CounterCraft

Share this post


Link to post
Share on other sites



I have this function where I need program to execute line when its before 4:00PM and after 9:00PM

I get syntax error if I use or statement.... any idea?

EDIT

ok nvm I got it working

Func ask4pass()

while $limithour < 16 or $limithour > 21

$answer = inputbox ("Time Over", "Please type password or prepare to be shutdown", "", "*", "", "", "", "", 60)

if $bypass = $answer then

Exit

Else

shutdown (5)

EndIf

WEnd

EndFunc

You could use @HOUR....

While @HOUR < 16 Or @HOUR >= 21

;code

WEnd

Instant Lockerz Invite - www.instantlockerzinvite.co.uk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0