TK_Incorperate Posted September 22, 2007 Share Posted September 22, 2007 Ok, well I have a funciton that checks the number of something, and I want to update that, and check for differences in the number, and tell me the difference, but I can't figure it out.... Here's my code NOTE: This function is done every second, so I don't know how to make the $Stat check differences, but it is set to $Value, then once it is set I need it to check differences, and reset $Stat to the new $Value once it is checked and recorded. NOTE2: The line "$New = $Value - $Stat" is trying to menis the new value, from the set stat, to see how much of a difference there is. Func _Update() $Value = GetNum() $Stat = $Value() If $Value <> $Stat Then $New = $Value - $Stat MsgBox(0, "", "Value changed: " & $New) EndIf EndFunc Link to comment Share on other sites More sharing options...
BananaFredSoft Posted September 22, 2007 Share Posted September 22, 2007 (edited) Func _Update() If IsDeclared ("Value") = 0 Then Global $Value $Stat = $Value $Value = GetNum() If $Value <> $Stat Then $New = $Value - $Stat MsgBox(0, "", "Value changed: " & $New) EndIf EndFunc This should help, if I am right about what you want to do. Edited September 22, 2007 by BananaFredSoft -ColinSite:www.bananafredsoft.comStuff:Simple Text Editor - MediaPlayer - Animator - BananaDB - BananaNotes - Chatta - Filesearch - Excuse GeneratorMy YouTube channel:http://www.youtube.com/user/colipat Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now