DSLua Community
Welcome,
Guest
. Please
login
or
register
.
February 07, 2012, 11:50:43 PM
1371
Posts in
262
Topics by
33109
Members
Latest Member:
Limewire Download
Home
Help
Search
Login
Register
DSLua Community
|
General DS Programming Chats
|
Code Hashing
|
Load another script
« previous
next »
Pages:
[
1
]
Print
Author
Topic: Load another script (Read 2142 times)
molster
Waxing Crescent
Posts: 19
Load another script
«
on:
July 20, 2007, 10:40:54 PM »
Im just now for the firs time using lua (I script in ActionScript (flash)) so I know the basics of coding =)-
anyway, what I wish to know is, is it possible to load another .lua file from a lua file. so instead of a script like
DSLua.WaitForAnyKey()
then just having it end, make it so once hit, it loads a new .lua file. (also, though i dont need this now, when(or if) you load the new script, can you pass all the vars to it?
Logged
Jeremysr
First Quarter
Posts: 215
Re: Load another script
«
Reply #1 on:
July 21, 2007, 12:13:37 AM »
Yes just use this function:
dofile( "file.lua" )
And I *think* it should run it as if the the code in that file was right inside the file you are running. So you should be able to use the same variables between the two files.
Logged
molster
Waxing Crescent
Posts: 19
Re: Load another script
«
Reply #2 on:
July 21, 2007, 01:45:00 AM »
Thanks! that will help keep my main file looking a lot cleaner.
(ps: your DSlua tutorial site is the best)
Logged
Pages:
[
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
DSLua - Best scripting language for Nintendo DS
-----------------------------
=> News and Announcements
=> Examples/Tutorials
=> Home-brew/Hacks/Games/Projects
=> Hardware and Equipments
=> Need Help?
=> Bugs & Suggestions
-----------------------------
General DS Programming Chats
-----------------------------
=> Code Hashing
=> Chat Room
=> Test Area
Powered by SMF 1.1 RC2
|
SMF © 2001-2005, Lewis Media