View Full Version : what are Booleans and how are they used?
Here2help
06-02-2012, 05:41 AM
Can someone explain this to me? or maybe link me to where I can read up on it?
Le Jingle
06-02-2012, 05:46 AM
Booleans will make a function return true or false. I'm not sure if there are further/more complex uses for them, however I'm most familair with them being used at the end of a function. Here's an example:
function LoggedIn: Boolean; //you throw a boolean at the end of the function, then make sure to use a result within your function, as done so below.
begin
//White text on Report Abuse Button
Result := (GetColor(472, 490) = 16777215); // our result will be true if we find this color at this cordinate.
end;
// Then we can use this in a script like so:
If LoggedIn Then
StartAlching;
Basically our If LoggedIn Then bit will only carry out if our LoggedIn function is found/returns true.
Runaway
06-02-2012, 05:46 AM
Ahhhh yeah, first time I've ever gotten to link someone to this! Only took 3 years :garfield:
http://villavu.com/forum/showthread.php?t=51174
Here2help
06-02-2012, 05:51 AM
Ahhhh yeah, first time I've ever gotten to link someone to this! Only took 3 years :garfield:
http://villavu.com/forum/showthread.php?t=51174
Lol
Well thank you.
Here2help
06-02-2012, 05:56 AM
That is way beyond my comprehensions lol
Scripting is not at all what I imagined it would be. its like painting art with text and your lines of code are your signature.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.