Can someone help clear things up for me here. I talked with Freedy about SCAR. He said he is currently using Delphi 7 with a script engine and creating a thread to launch the script in. Now I know from experience and Freedy agreed that variables do not get magically initialized to any particular value.
As you can see from my "Chicken" status that I am just a noob at SRL so I am assuming there is something I don't know about here but a lot of the code I have been looking at in the SRL library uses variables that are never initialized.
I copied and pasted some code below from the logout method.
You will notice that the local variable "c" is never initialized, so it could have a value of 83458736 as far as we know. Given that, you can see how the logic would not work i teajut happened to be something other than 0. This is just one of many examples I have run accross. I wrote a test program in delphi and attached a screen capture of the program window running in front of the source for the button click to demonstrate my point. I don't want to sound as if I am complaining because I am not. But I would like for either someone to explain to me how variables get initialized or we should begin going through all the existing code to fix these bugs. By the way these would be random because based on what other programs have run before you may get an unused area of memory or not so the values are completely unpredictable. I know some languages do initialize memory for you so I am assuming the developers are used to the other languages.
--------------code snipit--------------
function Logout: Boolean;
var
c, i: Integer;
begin
Result := (not (LoggedIn));
if Result = True then
Exit;
if GameTab(14) = False then
Exit;
Wait(200 + Random(100));
while (LoggedIn) or (c < 10) do
begin
--------------------------------------



Reply With Quote




