ParoXsitiC Posted July 12, 2010 Share Posted July 12, 2010 (edited) Global $UsersFile = @TempDir & "\Info" & Round(Random(0, 100), 0) & ".ini" $Test = IniRead($UsersFile, "Options", "BeFalse", False) Check($Test) IniWrite($UsersFile, "Options", "BeFalse", False) $Test = IniRead($UsersFile, "Options", "BeFalse", False) Check($Test) $Test = IniRead($UsersFile, "Options", "BeTrue", True) Check($Test) IniWrite($UsersFile, "Options", "BeTrue", True) $Test = IniRead($UsersFile, "Options", "BeTrue", True) Check($Test) Func Check($Test) If $Test Then ConsoleWrite("It is true!!!!!" & @CRLF) Else ConsoleWrite("It is false!!!!!" & @CRLF) EndIf EndFunc ;==>Check It should display It is false!!!!! It is false!!!!! It is true!!!!! It is true!!!!! But displays: It is true!!!!! It is true!!!!! It is true!!!!! It is true!!!!! Is this behavior normal? is it expected? how do I change it? Edited July 12, 2010 by ParoXsitiC Link to comment Share on other sites More sharing options...
bogQ Posted July 12, 2010 Share Posted July 12, 2010 (edited) Delite keyes before testing Func Check($Test) If $Test = "True" Then ConsoleWrite("It is true!!!!!" & @CRLF) Else ConsoleWrite("It is false!!!!!" & @CRLF) EndIf EndFunc ;==>Check Edited July 12, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 12, 2010 Share Posted July 12, 2010 IniRead always returns a string, not a boolean value. 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