From: bud_wis_er_420
program new;
{$i srl/srl.scar}
var
text :TStringArray;
begin
SetupSRL();
text := ['Hello', 'hello', 'bot', 'sup', 'wcing', 'fire']
if(FindChatBoxText(text, 8, clBlue))then
begin
Writeln('Texted Found')
end;
end.
The text variable is a TStringArray so it contains more than one string and in this code with;
If(FindChatBoxText(text,8,clblue)
You should probably have it as;
For I:= 0 to high(text) do
If(FindChatBoxText(text[I],8,clblue)) then
Begin
WriteLn('Found Text: ' + text[I]); // Reports on found text
end else
WriteLn('Text was not Found!'); // either goes here or after the other "end;"
End;
Just to explain what's going on abitSo this will go through all the strings in your array from the first string 'hello' through all the rest until the last string called 'fire'. It will Report what string it'd found by using the WriteLn(); function.
for I:=0 to high(text)
/\
This goes through all string in the given array from 0 (which is always the starting string,integer,Boolean etc. In a array! The high(text) finds the last integer,string,Boolean etc. That's what it does but what it means is that it gets the highest number hence the word high… This is a type of loop as it will cycle through whatever is in it as many times starting from "0" in this example to the number "5" as it counts up from "0" so that'd be the numbers;
0
1
2
3
4
5
There are 6 (integers which represent each value in the array). So to sum up it will go through each string looking for a similar one! Very helpful and time saving aswell as good for anti-ban and much more.
Ps. Sorry if the code I'd made doesn't work I haven't tested it and checked it :/ it mostly from memory a I'm not on Laptop :( any ques just post below or PM
~Bro433