forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dofile("")

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Sat Jan 21, 2006 7:05 pm    Post subject: dofile("") Reply with quote

I'm having a problem with this function. When you press cross on the Open Icon to select a file to open and press cross again to select a file, the fileselector.lua script seems to start over again. how can I return to the original script? The fileselector quits normally to lowser when running it stand-alone.

I did it like this:
dofile("fileselector.lua")
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
soulphalanx



Joined: 22 Aug 2005
Posts: 35

PostPosted: Sun Jan 22, 2006 2:11 am    Post subject: Reply with quote

in fileselector.lua, create a function, and in the main script, when you want to file select, refer back to that function and it should work
Back to top
View user's profile Send private message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Sun Jan 22, 2006 6:05 pm    Post subject: Reply with quote

thnx I fixed it already
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
Mechanical



Joined: 06 Feb 2006
Posts: 4

PostPosted: Mon Feb 06, 2006 9:28 am    Post subject: Reply with quote

Hi. I need help. I have a problem with "dofile"...
Dofile starts new file script, how to break previous script?
Back to top
View user's profile Send private message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Mon Feb 06, 2006 9:35 pm    Post subject: Reply with quote

There is no command to terminate a script.
You use
Code:
break
to exit loops. When luaplayer has gone trough all the loops and reached the end of the script, it exits the script and goes back to the script you started it from
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
Mechanical



Joined: 06 Feb 2006
Posts: 4

PostPosted: Mon Feb 06, 2006 11:11 pm    Post subject: Reply with quote

yeah, i know, but it's not a solution :/

in my game one level = one file. When You reach 20th level then will be 20 opened files. :/
Back to top
View user's profile Send private message
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Tue Feb 07, 2006 2:35 am    Post subject: Reply with quote

What about levelfile:close()?
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group