Extensions ?

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
hegvape
GamingTools Subscriber
Posts: 30
Joined: Tue May 02, 2006 4:28 am

Extensions ?

Post by hegvape » Fri Mar 30, 2007 11:01 am

Hi

I have been searching the wiki for a way to find out if an extension is loaded or not but I can't seem to find anything. Any help is welcome and I would appriciate alot.

Kindly

Val

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Fri Mar 30, 2007 12:03 pm

The "Extension" command, which you use to load extensions in the first place, supports listing the loaded extensions.

Code: Select all

ext -list

hegvape
GamingTools Subscriber
Posts: 30
Joined: Tue May 02, 2006 4:28 am

Post by hegvape » Fri Mar 30, 2007 12:30 pm

Yes I understand that, but is it possible to check it in a script?

for ex. if [extenstion]...

Thanks

Val

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Fri Mar 30, 2007 12:40 pm

Code: Select all

if !${Extension[isxeq2](exists)}
{
  echo "ISXEQ2 is not loaded"
}
alternatively you could use ext -require to make the script abort if it is not loaded

you can also do it in preprocessor (this helps if you have global objects that would get initialized before main runs, but require the extension)

Code: Select all

#if !${Extension[isxeq2](exists)}
#error "ISXEQ2 is not loaded"
#endif
or you can do the equivalent of ext -require in preprocessor

Code: Select all

#if !${InnerSpace:LoadExtension[isxeq2](exists)}
#error "ISXEQ2 is not and could not be loaded"
#endif

hegvape
GamingTools Subscriber
Posts: 30
Joined: Tue May 02, 2006 4:28 am

Post by hegvape » Fri Mar 30, 2007 12:44 pm

Thanks Lax, I couldnt find it in th wiki.

Kindly

Val

Post Reply