Sign in to follow this  
Followers 0
gcue

is not equal <> ?

5 posts in this topic

trying to express not equal to.. tried <> but it didnt seem to work

If $broadcast="2" Then
$broadcast="Disabled"
EndIf

If $broadcast <> "2" Then
$broadcast="Enabled"
EndIf

Share this post


Link to post
Share on other sites



You did it right

$broadcast = 1

If $broadcast="2" Then
$broadcast="Disabled"
EndIf

If $broadcast <> "2" Then
$broadcast="Enabled"
EndIf

MsgBox(0x0,"", $broadcast)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Other then what Val said only thing is in this code if $broadcast="2" then the value for $broadcast will be overwritten with "Disabled", thus satisfying $broadcast<>"2" (because it now equals "Disabled") which then make it "Enabled"


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Other then what Val said only thing is in this code if $broadcast="2" then the value for $broadcast will be overwritten with "Disabled", thus satisfying $broadcast<>"2" (because it now equals "Disabled") which then make it "Enabled"

good point.... :D

I was sure he was testing by "numbers"

Another approach

$broadcast = 1

If $broadcast = "2"  Then
    $broadcast = "Disabled" 
Else
    $broadcast = "Enabled" 
EndIf

MsgBox(0x0, "", $broadcast)

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

great!

thank you fellas.

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