SRL Archive - OSR Help

Having trouble using SMART_paint


ookamocka

2013-03-10 00:35:47

trying to just do a simple

  if (findDTM(water,x,y,11,12,508,327)) then
begin
SMART_ClearCanvas;
SMART_DrawBoxEx(true, intToBox(x-5,y-5,x+5,y+5), clGreen);
end;

but I kept getting the error

Compiling failed.
[Error] (26:5): Unknown identifier 'SMART_ClearCanvas' at line 25


I figured that I didn't include the file, so I added

{$i srl/srl/misc/paintsmart.simba}

now I'm getting the following error within paintsmart.simba

[Error] C:\Simba\Includes\srl/srl/misc/paintsmart.simba(44:33): Unknown identifier 'SmartGetDebugDC' at line 43
Compiling failed.

Ashaman88

2013-03-10 00:36:38

Smartgraphics file not paintsmart

ookamocka

2013-03-10 00:43:11

From: Ashaman88
Smartgraphics file not paintsmart


then whats the file i'm supposed to include?

Justin

2013-03-10 00:47:10

From: ookamocka
then whats the file i'm supposed to include?


SmartGraphics.simba

ookamocka

2013-03-10 00:57:43

From: Justin
SmartGraphics.simba


yeah i had found it thx… but now I'm getting this error whenever I try to clear the canvas, whether it be from using the clear function or the clear parameter to true…

Error: Exception: Access violation at line 78


within the SmartGraphics.simba

this is the function that's bring up an error

procedure SMART_ClearCanvas;
begin
if (not SMART_DebugSetup) then
SMART_SetupDebug;

If (SMART_CANVAS.TransparentColorSet) then
SMART_CANVAS.FastDrawClear(SMART_CANVAS.GetTransparentColor)
else
SMART_CANVAS.FastDrawClear(0);
end;

this is the line:

    SMART_CANVAS.FastDrawClear(0); 

The Mayor

2013-03-10 01:11:05

It must be something in your script, post your code.

ookamocka

2013-03-10 01:19:30

program testP07;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$i SRL/SRL/Misc/SmartGraphics.simba}

var
x, y, water: integer;

//LOGIN INFO STUFF
procedure P07_DeclarePlayer;
begin
P07_PlayerName:='Name';
P07_PlayerPass:='Pass';
end;

procedure loadDTM;
begin
water := DTMFromString('mQwAAAHicY2ZgYBBgZGAQB2IxIL7LAMGPgLhn422G5nX3GUqW3WDgB/JhmAUJAwEAXdwJMw==');
end;

procedure paintScreen;
begin
if (findDTM(water,x,y,11,12,508,327)) then
begin
//SMART_ClearCanvas;
SMART_DrawBoxEx(true, true, intToBox(x-10,x+10,x-10,x+10), clRed);
end;
end;

begin
clearDebug;
SetupSRL;
P07_DeclarePlayer;
SetupP07Include;
ActivateClient;
loadDTM;
wait(2000);

if (not P07_LoggedIn) then
begin
P07_LogInPlayer;
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
end

else
begin
paintScreen;
//checkFishingSpot;
end;
end.

Ashaman88

2013-03-10 01:21:51

I'm guessing it has something to do with the navbar offsets - it works in the official OSR include

The Mayor

2013-03-10 03:07:27

From: ookamocka
program testP07;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$i SRL/SRL/Misc/SmartGraphics.simba}



What I would suggest is trying SMART8. Install SMART 8 and define it at the top {$DEFINE SMART8}.

litoris

2013-03-10 03:19:31

I have the exact same problem. Once I draw something, I can't clear the canvas. Using the smartgraphics file and Smart 8.

ookamocka

2013-03-10 10:36:55

From: litoris
I have the exact same problem. Once I draw something, I can't clear the canvas. Using the smartgraphics file and Smart 8.


hmm… well anyone else know what's going on here?

Ashaman88

2013-03-10 13:50:20

Yes I tell you it's probably b/c you are using it w/ 07 and you didn't update smartgraphics for 07. Just pull the one off of the official one on github

ookamocka

2013-03-10 14:10:56

added the 07 SmartGraphics… and now i'm getting this error -_-

Exception in Script: Define not closed



nvm, for some reason when i d/l'd SmartGraphics, all the HTML/XML tags were still there