Log in

View Full Version : Problems trying to test LAPE



eska
08-14-2012, 03:40 AM
Lape is going to come out relatively soon (hopefully?) so I want to work with it, to see the possibilities it offers, the speed increase and.. well simply get used to it.

Current SRL doesn't work with Lape but from what I can understand, there is a branch in github for SRLLape:
https://github.com/SRL/SRL-5/tree/lape_fixes

So I downloaded this, backed up my Simba folder and replaced all the files that could be replaced with the ones from the github lape branch but I can't seem to make it work.
I always get the following error:

Exception in Script: Duplicate declaration "ActivateClient" at line 38, column 29 in file "C:\Simba\Includes\srl\SRL.simba"

The 'script' I'm using:
program new;
{$DEFINE LAPE}
{$i srl/SRL.simba}

begin
SetupSRL;
end.

I messed with it for a couple hour, and even though I got rid of that error, it was only to get some more wierd error (obviously I removed/added stuff I shouldn't have).

Does anyone know how to make this work? Thanks.

Flight
08-14-2012, 04:01 AM
That's a good question, I'd also like to know how to get SRL-Lape up and running. By now, everything should be running on Lape, the SRL include as well as scripts.

I'll check back in this thread from time to time to see if any more info turns up.

eska
08-14-2012, 04:03 AM
That's a good question, I'd also like to know how to get SRL-Lape up and running. By now, everything should be running on Lape, the SRL include as well as scripts.

I'll check back in this thread from time to time to see if any more info turns up.

I know right, it's supposed to work but almost no one talks about it.
If you search by title, only 3 result come out.

JN13
08-14-2012, 04:50 AM
I've been looking for this too! There also seems to be so much added capability to Lape, I wish there was a comprehensive tutorial on it :/ <- Doesn't understand pointers at all.

eska
08-14-2012, 04:54 AM
In computer science, a pointer is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere in the computer memory using its address

In other word, the pointer is a variable, but instead of containing the data, it contain the address of the data. It 'points' to an address.

It's that simple.

nielsie95
08-14-2012, 12:09 PM
Download the latest Simba build (http://nala.villavu.com/downloads/master/2b461bc5553ee58410d9ba05dec1655cdf004ccf/) and get the latest git revision for SRL-Lape. It was indeed broken.

Flight
08-14-2012, 12:33 PM
Download the latest Simba build (http://nala.villavu.com/downloads/master/2b461bc5553ee58410d9ba05dec1655cdf004ccf/) and get the latest git revision for SRL-Lape. It was indeed broken.

Oh my, the Script Manager. :drool:

Edit:
Although I'm still having compile problems, maybe I'm doing something wrong.

Edit2:
Nevermind, fixed all the compile errors, gonna test it now.

eska
08-14-2012, 12:40 PM
Thanks nielsie95.

Just tried the new build, now I get those error:

[Error] C:\Simba\Includes\SRL\SRLLape.simba(12:13): Unknown identifier 'StringReplace' at line 11
Compiling failed.
Exception in Script: Unknown declaration "SetupSmart" at line 190, column 7 in file "C:\Simba\Includes\SRL\SRL.simba"

Going to mess around and try to fix it. I'm using smart 8.0 if that can help.

Edit: Never mind, it now compiles fine. Seems like SRL Lape require that you use SMART.
Then all you need to do is remove the -1 at line 285 in smartparams.simba in the parameters if you are using smart 8.0.

nielsie95
08-14-2012, 12:44 PM
Interpreter set to Lape?

eska
08-14-2012, 12:49 PM
Yes, that wasn't the problem but I got it fixed now.

Seems like SRL Lape require that you use SMART.
Then all you need to do is remove the -1 at line 285 in smartparams.simba in the parameters if you are using smart 8.0.

Anyway, thanks again for the help.

nielsie95
08-14-2012, 12:51 PM
It only uses SMART for me when I do {$DEFINE SMART} before including SRL? You need to remove -1 for SMART 8, yes. I didn't want to change this, because the main SRL branch uses the -1.

Flight
08-14-2012, 12:52 PM
I fixed the errors and here's what I came up with: (These might not be correct, but the entire include compiles successfully)

Base script:

{$DEFINE SMART}
{$DEFINE LAPE}
{$I SRL/SRL.Simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Slayer;
Active := True;
end;
end;

begin
Smart_FixSpeed := True;
DeclarePlayers;
SetupSRL;
end.


SRL.Simba modification:
Line 38 changed to:

Procedure ActivateClient; {$IFDEF LAPE} override; {$ENDIF} begin end;


SmartParams.Simba modification:
Line 285 changed to:

Result:= SmartSpawnClient({$IFDEF LAPE}Replace{$ELSE}ReplaceWrap{$ENDIF}(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '');

Line 388 changed to:

writeln('GetRealMousePos not implemented yet in SRL-5 Lape!');


Nielsie: Is is normal to take over 2 seconds for Lape to compile the SRL include?

eska
08-14-2012, 12:53 PM
If I do not use SMART I get the following message:

Exception in Script: Unknown declaration "SetupSmart" at line 190, column 6 in file "C:\Simba\Includes\SRL\SRL.simba"

Edit: I noticed it takes more time to compile too, but then when you execute it's super fast.
Edit: I also got another question, with the change to lape, is it supposed to be compatible with current scripts (not in lape?) Because I just tried to compile MSI and it returns me this error:
Exception in Script: Unknown declaration "clLime" at line 138, column 20 in file "C:\Simba\Includes\srl\srl\misc\smartgraphics.simba" I forgot to reset the interpreter back to pascal script...

Flight
08-14-2012, 01:00 PM
If I do not use SMART I get the following message:


Edit: I noticed it takes more time to compile too, but then when you execute it's super fast.
Edit: I also got another question, with the change to lape, is it supposed to be compatible with current scripts (not in lape?) Because I just tried to compile MSI and it returns me this error:

Looking at the code theres plenty of backward compatibility stuff so I believe it should but maybe I'm seeing to wrong way.

I think that needs to be defined with the other colors in SRLLape.Simba, near the bottom.

Now a compile error when including SPS in a script:


Exception in Script: Unknown declaration "TClient" at line 34, column 6 in file "D:\Simba\Includes\SPS\sps.simba"


Where is TClient & getTClient normally defined?

eska
08-14-2012, 01:03 PM
Fixed the colors by hardcoding some bogus colors (11111) and now I'm faced with this error:

Running MSI...
Exception in Script: Unknown declaration "TBitmap" at line 340, column 16 in file "C:\Simba\Includes\srl\srl\misc\smartgraphics.simba"

Kyle Undefined
08-14-2012, 01:19 PM
SRL 6 will be only in Lape ;)

eska
08-14-2012, 01:28 PM
Forgot to set interpreter back to pascal script... that's why it didn't work for MSI.

Works like a charm.

But I still got issues with SRL lape when I do not include smart.

Exception in Script: Unknown declaration "SetupSmart" at line 190, column 6 in file "C:\Simba\Includes\SRL\SRL.Simba"

nielsie95
08-14-2012, 01:53 PM
Flight, are you sure you were on the latest SRL-Lape? I believe I changed that ActivateClient already.
TClient is a class, so it is not exported yet (same goes for TMufasaBitmap and forms).

eska, what if you try to run my script (http://villavu.com/forum/showthread.php?p=1085882)? It should only need the Smart 8 fix if you are using it. Does it still give you the SetupSmart error?

EDIT: Oh wait, you aren't using SMART. Anyway, that should work too, just remove the define at the top of the script.

eska
08-14-2012, 02:16 PM
Flight, are you sure you were on the latest SRL-Lape? I believe I changed that ActivateClient already.
TClient is a class, so it is not exported yet (same goes for TMufasaBitmap and forms).

eska, what if you try to run my script (http://villavu.com/forum/showthread.php?p=1085882)? It should only need the Smart 8 fix if you are using it. Does it still give you the SetupSmart error?

EDIT: Oh wait, you aren't using SMART. Anyway, that should work too, just remove the define at the top of the script.


Took your script, compiled it, everythings work fine. The problem is if I don't define SMART, I get this error:

Exception in Script: Unknown declaration "SetupSmart" at line 190, column 6 in file "C:\Simba\Includes\SRL\SRL.simba"

I went in the file to check, and it is inside a ifdef and it shouldn't get there, but for some reason it does...
{$IFDEF SRL_SMART}
{$IFDEF SIMBAMAJOR980}
if (Smart_Server = 0) then
begin
Smart_Server := RandomWorld(Smart_Members, False);
Smart_Signed := True;
Smart_SuperDetail := False;
end;
Writeln('SMART Initialized.' + #10 + 'Loaded: Server ' + IntToStr(Smart_Server) + ', Members: ' + BoolToStr(Smart_Members)
+ ', Signed: ' + BoolToStr(Smart_Signed) + ', Super Detail: ' + BoolToStr(Smart_SuperDetail) + '.');
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);
SetTargetArray(SmartImageArray, 765, 553);
{$ELSE} //It enter here for some reason wtf....
SetupSmart(Smart_ForceNew); //and obviously it gives an error here because SMART isnt defined.
if (SRL_SixHourFix) then
SRL_Procs[srl_OnRSUpdate] := @SixHourFix;
{$ENDIF}

Flight
08-14-2012, 03:47 PM
Flight, are you sure you were on the latest SRL-Lape? I believe I changed that ActivateClient already.
TClient is a class, so it is not exported yet (same goes for TMufasaBitmap and forms).


I'm quite sure I am, yes. It only occurs with SPS. Does this mean SPS isn't compatible with Lape?

eska
08-14-2012, 04:01 PM
I still have the issue when not using SMART.

Somehow, SMART is defined and it's not inside my script... I'm trying to find where

nielsie95
08-14-2012, 04:01 PM
eska, that sounds like the bug in Lape that should've been fixed in the new build. Are you sure you are using the Simba that I posted?

Flight, SPS uses TMufasaBitmap the last time I checked, so it's not compatible.

eska
08-14-2012, 04:07 PM
I really don't understand what's wrong.

I'm going to install simba from scratch and see if it fix something..
Edit: Ok so I realised I wasn't using the build 1000. Hopefully it will work.. I'll edit once it work.

Edit: It works. Like flight said, SPS doesn't work.

Olly
08-14-2012, 04:36 PM
eska, that sounds like the bug in Lape that should've been fixed in the new build. Are you sure you are using the Simba that I posted?

Flight, SPS uses TMufasaBitmap the last time I checked, so it's not compatible.

I'm assuming that SPS can be "converted" over?

eska
08-14-2012, 05:05 PM
I get this error everytime I close simba:
http://i48.tinypic.com/jt55jb.jpg

Error log:

Program exception!
Stacktrace:

Exception class: EAccessViolation
Message: Access violation
$00000000
Simba Version: 1000



Beside that anoying error (which has no impact on the script).. it's only stuff that isn't implemented yet that doesn't work (bitmap, SPS, MSI (because of sps and uses of bitmap).
I've manage to compile MSI by commenting out all drawing and use of SPS, as well as a few other fixes.

Too bad, I wanted to see the speed we can draw stuff in Lape. Seems like it will have to wait.

Edit: For some reason I'm not getting the error. At first I didn't get the error, then I got it for some time, and now, I'm not getting it... very wierd. I'll edit if error comes back.

x[Warrior]x3500
08-14-2012, 05:52 PM
hey nielsie, just wanted to say thanks for all the hard work you have put into lape. just decided to try it out again and i was easily able to run my ivy cutter beautifully. great job on lape thus far!

eska
08-14-2012, 06:18 PM
Oh my god I just noticed that we now have a debugger and a script manager in simba 1000.

The script manager doesn't seem to be active yet but the debugger is. This will help so much fix those wierd bug we sometime come across.

Flight
08-15-2012, 01:51 AM
x3500;1086029']hey nielsie, just wanted to say thanks for all the hard work you have put into lape. just decided to try it out again and i was easily able to run my ivy cutter beautifully. great job on lape thus far!

Indeed, thank you very much Nielsie, it's nice to see this finally taking off. :)

eska
08-15-2012, 02:15 AM
Is SmartGraphic supposed to work with Lape?
I tried to include it and as soon as I do I get error about replaceString. I tried the fix Flight suggested but it doesn't work.

Edit: Just took a carefull look at it and there's no way it could work according to what you said about bitmaps not being implemented yet.

and yes thanks for the help. This picture describe this thread pretty well haha:
http://i48.tinypic.com/2eba3xk.png