SRL Archive - SRL Old School RuneScape

SRL-OSR Include blocks Message Boxes etc.


cheesedoodal

2013-10-14 13:21:58

Hello!
When I try to run
program new;
{$DEFINE SMART8}
begin
MessageBox('Hello! Welcome to the message box tutorial!', 'Message box tutorial',4);
end.
everything works fine.
However, when I add
{$I SRL-OSR/SRL.Simba}
so it becomes
program new;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
begin
MessageBox('Hello! Welcome to the message box tutorial!', 'Message box tutorial',4);
end.
It just loads up SMART, without showing the message box. What is wrong?

Thank you!

Brandon

2013-10-14 14:05:37

You're using Lape's interpreter apparently.. Well I can't be 100% sure.. But whoever keeps adding the main proc to the includes needs to stop that. I think that is the reason..


In SRL.Simba (near the end) it looks like:

{$ifdef CompileSRL}
begin
SetupSRL;
end.
{$endif}

{$ifdef LAPE}
begin
SetupSRL;
end.
{$endif}


Remove it.

It could also be that RSReady failed and so you're in an infinite loop. In that case, check your graphic settings if any.. Otherwise I don't know what else could be wrong.

cheesedoodal

2013-10-14 15:02:01

From: Brandon
You're using Lape's interpreter apparently.. Well I can't be 100% sure.. But whoever keeps adding the main proc to the includes needs to stop that. I think that is the reason..


In SRL.Simba (near the end) it looks like:

{$ifdef CompileSRL}
begin
SetupSRL;
end.
{$endif}

{$ifdef LAPE}
begin
SetupSRL;
end.
{$endif}


Remove it.

It could also be that RSReady failed and so you're in an infinite loop. In that case, check your graphic settings if any.. Otherwise I don't know what else could be wrong.


changed to PascalScript, and everything worked. Thanks!