PDA

View Full Version : Multiple scrpits in one file



RebelHill
03-19-2011, 04:47 AM
So with .p plugin files, its possible for there to be multiple plugins contained within the one file...

Is this possible with lscript, and if so, how?

Thanks.

evenflcw
03-19-2011, 10:02 AM
Not possible. For a plugins you define the internal name of the plugin, but for scripts the filename is used. Proof: If you have two scripts with the same filename (but at different locations), the one loaded last gets the spot (previous entries overridden). Then there is the fact that the entry-points of scripts are predefined (ie main, generic etc). The lscript parser won't like having multiple functions with the same signature in the same file. And to my knowledge there is no pragma to define another internal name for scripts or change the predefined entry-points.

Everything points toward impossible. But I never tried it.

You can however have one script install the others via command "AddPlugins sfilename". If you really have too much time on your hands you could perhaps have a script extract the others from a common file and install them. :)

RebelHill
03-21-2011, 08:54 AM
I kinda figured as much.

No biggie really, but thought Id check.

cheers.