stein3
2010-04-22 13:18:53
[PHP][Runtime Error] : Exception: Canvas does not allow drawing in line 74 in script \SCAR\includes\SRL\SRL\Core\AntiRandoms\Common.scar[/PHP]
[PHP]{*******************************************************************************
function SRL_GetBlackBackground: Integer;
by: ZephyrsFury
Description: Autocolours the black background colour. Returns -1 if not found.
*******************************************************************************}
function SRL_GetBlackBackground: Integer;
var
CTS, I, H, C, Count, MaxC: Integer;
TPA: TPointArray;
Cols: TIntegerArray;
begin
Result := -1;
if (not(LoggedIn)) then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(100, 100);
FindColorsTolerance(TPA, clBlack, MMX1, MMY1, MMX2, MMY2, 2);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then Exit;
Cols := GetColors(TPA);
ClearSameIntegers(Cols);
H := High(Cols);
for I := 0 to H do
begin
C := Cols;
Count := CountColor(C, MMX1, MMY1, MMX2, MMY2);
if (CountColor(C, MMX1, MMY1, MMX2, MMY2) > MaxC) then
begin
Result := C;
MaxC := Count;
end;
end;
end;[/PHP]
Line 74: Cols := GetColors(TPA);
What's the issue here? All its doing is a findobject, but this happens.
Its in SMART if that makes a difference.
I'm working on releasing a vial filler, so if you want it help me out :stirthepot:.
edit: it may have just been an issue with the selected client and SMART… I don't really know how smart works though.
SMART is the client. When you use SMART you do not need to have another RS client open nor do you need to select a client. SMART/SRL does all that for you.
stein3
2010-04-22 14:05:56
Alright, that's what I was starting to figure out.
Another issue: All of the banking routines (built into SRL, I barely have to do anything thanks to you guys :p) are failing. They find the booths/bankers, right click it, then just completely ignore the fact that the menu was open. I tried shortening the option string from "uickl" or whatever to "uic" and it still couldn't find it… This is infuriating, it was working perfectly fine not too long ago.
Frement
2010-04-22 14:23:59
From: nategr8ns
Alright, that's what I was starting to figure out.
Another issue: All of the banking routines (built into SRL, I barely have to do anything thanks to you guys :p) are failing. They find the booths/bankers, right click it, then just completely ignore the fact that the menu was open. I tried shortening the option string from "uickl" or whatever to "uic" and it still couldn't find it… This is infuriating, it was working perfectly fine not too long ago.
You got SCAR prerelease 3.23?
Heres a good tutorial on setting up scar prerelease + srl :)
http://www.villavu.com/forum/showthread.php?t=47714
aran armath
2010-04-22 14:32:00
From: nategr8ns
Alright, that's what I was starting to figure out.
Another issue: All of the banking routines (built into SRL, I barely have to do anything thanks to you guys :p) are failing. They find the booths/bankers, right click it, then just completely ignore the fact that the menu was open. I tried shortening the option string from "uickl" or whatever to "uic" and it still couldn't find it… This is infuriating, it was working perfectly fine not too long ago.
Another note, make sure you are running it in SMART or else half the time when I started making my log banker it wouldn't bank just right click then zoom off to the right. I believe running it in SMART fixed it.
From: nategr8ns
Alright, that's what I was starting to figure out.
Another issue: All of the banking routines (built into SRL, I barely have to do anything thanks to you guys :p) are failing. They find the booths/bankers, right click it, then just completely ignore the fact that the menu was open. I tried shortening the option string from "uickl" or whatever to "uic" and it still couldn't find it… This is infuriating, it was working perfectly fine not too long ago.
Try
WaitOptionMulti(['uickly', 'ui', 'ck', 'ly'], 2000);
I often have to search that way for text's as it messes up rather frequently if I don't.
stein3
2010-04-22 21:01:06
From: Frement
You got SCAR prerelease 3.23?
Heres a good tutorial on setting up scar prerelease + srl :)
http://www.villavu.com/forum/showthread.php?t=47714
Already have it set up properly, but thanks.
From: aran armath
Another note, make sure you are running it in SMART or else half the time when I started making my log banker it wouldn't bank just right click then zoom off to the right. I believe running it in SMART fixed it.
I've declared the SMART variables I need to, I believe. World, Detail, Signed. What else do I need to do?
From: NCDS
Try
WaitOptionMulti(['uickly', 'ui', 'ck', 'ly'], 2000);
I often have to search that way for text's as it messes up rather frequently if I don't.
So basically I should write my own banking procedure? Too bad, I was looking forward to just using the premade SRL ones :p.
Blumblebee
2010-04-22 21:28:31
I use the premade SRL banking and it works fine. I would suspect that your not using SCAR pre-release like Frement suggested. Beyond that I have no idea.
aran armath
2010-04-22 21:29:32
http://villavu.com/forum/showthread.php?t=41284Thats a tut on putting smart into a script, it works, its what I used. The bank commands seem to work fine in smart, havent had any issues.
stein3
2010-04-22 21:49:38
From: aran armath
http://villavu.com/forum/showthread.php?t=41284
Thats a tut on putting smart into a script, it works, its what I used. The bank commands seem to work fine in smart, havent had any issues.
Thanks, reread that and I switched from calling SetupSRL before the smart variables to after, and I added smart_members and it fixed it :).