SRL Archive - S.M.A.R.T.

Run-Time Error


jarred1

2008-06-29 05:13:52

Whenever I run a SMART script, I get an error. This stops SMART from functioning and I have to auto on non-smart scripts. I already posted about this, but I think it's in the wrong area, so I'm posting here. This is the error:

[Runtime Error] : Exception: Canvas does not allow drawing in line 95 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Players.scar


I'm using SCAR DIVI CDE 3.15, the newest SRL and thats all. I've tried restarting SCAR, tried re-installing. I've tried a lot of things but nothings working. Ideas/Solutions will be appreciated dearly. Thanks for reading this far :P

EvilChicken!

2008-06-29 05:22:25

If this doesn't fix the script,


After SmartSetup(Ex), if there even is one, insert this code.
Wait(5000);
SetTargetDC(SmartGetDC);

Just CTRL + F, and search for SmartSetup, if there isn't a SmartSetup(Ex) line, you have to add it aswell.

SmartSetUpEx(ReplaceThisWithDesiredWorldNumberAsAnInteger, False, False);


If this didn't help. please post the script you're using.

jarred1

2008-06-29 21:02:10

This error happens on all SMART scripts, but I'll use 'RM Extreme Cutter' as an example. This is the SMART setup procedure thing.

procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
end;

So I think it already has what you said, but I changed it anyway;
procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
Wait(5000);
SetTargetDC(SmartGetDC);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
end;
And the error still occurred. If you want the whole script, here's the link: http://www.srl-forums.com/forum/attachment.php?attachmentid=12971&d=1213111742

Lee Lok Hin

2008-06-29 21:57:24

SetTargetDC(SmartGetDC); twice

Try removing the first one and see what happens.

HyperSecret

2008-06-29 23:02:24

SmartSetupEx(SMART_World, false, Signed);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);

that is what i use

jarred1

2008-06-29 23:09:15

Lee, I added in the second one because that was EvilChicken! suggested. But it doesn't work with one either.]

Hyper, that's exactly what the script uses already…

Please, I really want to use SMART.

jarred1

2008-07-01 04:44:07

This is really annoying me. I used Forest Frostbite, and it worked fine with SMART, to my surprise. I had to exit, so I re-downloaded it and I got the error again. I really want to use SMART without having it to THIS to me. Please, help.

EvilChicken!

2008-07-01 06:05:00

I said:

Put SetTargetDC(SmartGetDC); after setting up smart and a wait of 5000 ms.



Read posts.