User Tools

Site Tools


lua:loadscriptfunction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lua:loadscriptfunction [2014/12/27 07:51] – created vodurlua:loadscriptfunction [2015/09/28 16:38] (current) vodur
Line 3: Line 3:
 A script file is loaded from the desginated folder and run as a prog. A script file is loaded from the desginated folder and run as a prog.
  
-Example: ch1:loadscript("vodur", "testscript") This will load the contents of 'testscript.lua' from the 'vodur' folder and run it as an mprog (assuming ch1 is a CH object).+Example: 
 + 
 +<code lua> 
 +ch1:loadscript("vodur", "testscript") 
 +</code> 
 + 
 +This will load the contents of 'testscript.lua' from the 'vodur' folder and run it as an mprog (assuming ch1 is a CH object).
  
 This functionality is identical to loadprog. The reason to prefer loadscript would be the convenience of editing outside of olc, and a greater size limit. Prog scripts are limited to 10,000 characters whereas loadprog allows up to 100,000 characters to be loaded. This functionality is identical to loadprog. The reason to prefer loadscript would be the convenience of editing outside of olc, and a greater size limit. Prog scripts are limited to 10,000 characters whereas loadprog allows up to 100,000 characters to be loaded.
lua/loadscriptfunction.1419666677.txt.gz · Last modified: 2014/12/27 07:51 by vodur