1. Post #1
    DaneSomdahl's Avatar
    April 2011
    266 Posts
    Basically, I've got two Lua scripts.

    Say AllMyStuff.lua has the following:

    Code:
    function MyStuffFunction( Input )
    	print(Input .. " was the input.");
    end
    and then I've got another separate file called CallFromHere.lua and it contains:

    Code:
    function DoStartup()
    	MyStuffFunction("Blah blah blah, Mr. Freeman...");
    	MyStuffFunction("BlackPeople['Favorites'].Watermelon = true");
    end
    
    DoStartup();
    How exactly would I have it able to use a function from a separate script, or would that work?

  2. Post #2
    Pycские Идиот
    LauScript's Avatar
    June 2010
    2,529 Posts
    include( 'otherscript.lua' );

    if this file was parsed or whatever after the other file, you can already use those functions.