SRL Archive - FAQ

includes in a extension?


Shuttleu

2010-08-02 12:32:33

can you have a include in a extension?

~shut

EDIT: i get this when i do
Error in Simba extension (C:\Simba\Extensions\msi.sex) : Unknown compiler directives at 2:18

Coh3n

2010-08-02 21:14:10

I'm also curious about this. I get the same error when I try to enable the attached extension. I think it's when I include SRL.scar, but I'm not positive.

E: Oh and it compiles in Simba if you comment out everything from line 259 and down (excluding the mainloop).

Nava2

2010-08-02 21:35:15

How are you including it?

Also, extensions are a sandboxed version of the scripting engine, thus probably cannot compile anything.

Coh3n

2010-08-02 22:46:26

From: Nava2
How are you including it?

Also, extensions are a sandboxed version of the scripting engine, thus probably cannot compile anything.

{$i srl/srl.scar}

It will work if you include anything that doesn't have defines in it. Seems that way anyway…

I can include, say, Globals.scar from MSI and it will work perfectly.

Wizzup?

2010-08-03 03:35:20

Alright, so compiler directives are not turned on in extensions?

Also, a lot of functionality is not exported to the extensions, because there's simply no way an extension will need all the functions the script needs.

Coh3n

2010-08-03 11:18:55

From: Wizzup?
Alright, so compiler directives are not turned on in extensions?

Also, a lot of functionality is not exported to the extensions, because there's simply no way an extension will need all the functions the script needs.

I guess not.

The reason we wanted to include MSI files was so we didn't have to have useless functions to store information that's already stored in MSI's records. It's also very helpful so we don't have to update the extension every time MSI is updated.

Nava2

2010-08-03 11:37:25

Why not write everything to the SettingsXML and then have the script and extension cooperate with reading it?

Shuttleu

2010-08-03 12:00:37

we have managed to do what we wanted to use this for, but including compiler directives in the extensions would help other people

~shut

Coh3n

2010-08-03 12:05:52

From: Nava2
Why not write everything to the SettingsXML and then have the script and extension cooperate with reading it?

Assuming I understand that correctly, that would require writing all the script/location records to the file, which would work just fine. However, like Shut said, we've figured it all out, I'm just working on implementing it now. :)