I'm not sure what PSPLua is like so I can't compare for you right now...
DSLua includes almost all of the same functions as normal lua, almost everything tought in this page (
http://www.lua.org/pil ) will work in DSLua. Of course there are also extra functions for the DS which are found on the documentation (see the menu to the left.)
So yes there is a dofile function, I would write it like this but your way might work (I've always used parentheses):
dofile( "mainmenu.lua" )
Random numbers are also the same as normal lua (
http://www.lua.org/pil/18.html ). Except for the seed number use DSLua.VBlankCount() which is the number of V-blanks since the program started (it counts up every 1/60 of a second.) So:
math.randomseed( DSLua.VBlankCount() )
print( math.random( 4 ) )
This prints a number either 1 2 3 or 4 (you have to set up the screens first in DSLua though). If you want it to be inbetween 5 and 10 (for example) you would put this: math.random( 5, 10 ) .
And no they weren't stupid questions, they were good questions.
