Squirrel/Server/Functions/Scripts/LoadModule

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (paste shite)
(i fucking suck)
 
Line 26: Line 26:
 
=== Notes ===
 
=== Notes ===
  
The function [[Squirrel/Server/Functions/Misc/print|print]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in this example. More info about them in the corresponding pages.
+
The function [[Squirrel/Server/Functions/Misc/print|print]] and event [[Squirrel/Server/Events/Misc/onScriptLoad|onScriptLoad]] were used in this example. More info about them in the corresponding pages.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Scripts}}
 
{{Squirrel/Server/Functions/Scripts}}

Latest revision as of 04:03, 25 September 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function will load an external C/C++ module which will add extra functionality to scripting. Note that the module you wish to load should be placed in the Modules/ folder of your server.

[edit] Syntax

  1. bool LoadModule( string moduleName )

[edit] Arguments

  • moduleName - The name of the module without the extension .dll or .so

[edit] Example

This example will load the module lu_ini when the script is loaded.

  1.  
  2. function onScriptLoad()
  3. {
  4. LoadModule( "lu_ini" );
  5. print( "Scripts and module loaded!" );
  6. return 1;
  7. }
  8.  

[edit] Notes

The function print and event onScriptLoad were used in this example. More info about them in the corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox