Thursday, 20 November 2008
Home
Forum
Main Menu
Home
News
Forum
Documentation
Download
Links
Administrator
Login Form
Welcome,
Guest
. Please
login
or
register
.
November 20, 2008, 07:15:24 AM
Username:
Password:
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forgot your password?
Load another script
DSLua Community
Welcome,
Guest
. Please
login
or
register
.
November 20, 2008, 07:15:24 AM
1723
Posts in
315
Topics by
5664
Members
Latest Member:
GlygievyGal
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 1063 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
Waxing Gibbous
Posts: 254
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
(C) 2008 DSLua
DSLua - Best scripting language for Nintendo DS home-brew!