TK_Incorperate 0 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 Share this post Link to post Share on other sites
BananaFredSoft 0 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 Share this post Link to post Share on other sites