QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

how to make lua exit when i press on an option.

This is a discussion on how to make lua exit when i press on an option. within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; hi sorry about the questions but i cant get os.exit() end to work, my psp just crashes, i did try ...

Reply
 
LinkBack Thread Tools
Old 03-31-2008, 08:28 AM   #1
 
linkinworm's Avatar
 
Join Date: Jan 2008
Posts: 256
Trader Feedback: 0
Default how to make lua exit when i press on an option.

hi sorry about the questions but i cant get

os.exit()
end

to work, my psp just crashes, i did try a different command once, but that didnt work either, why doesnt it work?
linkinworm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2008, 08:48 AM   #2
 
Join Date: Jan 2008
Posts: 612
Trader Feedback: 0
Default

Press the home button? I dunno why people think their stuff needs an exit option in the menu.
TurtlesPwn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2008, 09:20 AM   #3
Enter Custom Title
 
waywardson's Avatar
 
Join Date: Mar 2007
Posts: 547
Trader Feedback: 0
Default

try:
System.Quit()
__________________
http://img489.imageshack.us/img489/5841/99862310tg8.jpg
Quote:
Originally Posted by qwerty6523
tobias what do you mean by a hump and run
plz explain what that is
Quote:
Originally Posted by jaymes
hump and run.. =] thats called a one night stand
waywardson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2008, 09:28 AM   #4
 
linkinworm's Avatar
 
Join Date: Jan 2008
Posts: 256
Trader Feedback: 0
Default

when i put that in i get

Error: menu.lua:59 attempt to index global 'system' (a nil value)
press start to restart
linkinworm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2008, 09:39 AM   #5

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Or let the game end properly by breaking out the main loop.
Code:
endGame = false;
while not endGame do
	pad = Controls.read();
	if pad:home() then
		endGame = true;
	end
end
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2008, 09:43 AM   #6
Enter Custom Title
 
waywardson's Avatar
 
Join Date: Mar 2007
Posts: 547
Trader Feedback: 0
Default

first of all what luaplayer r u using?
if your using luaplayerHM then System.Quit() should work but remember...
you are getting that error because u typed System as system with a lower case S...lua is case sensitive so make the S in System capital and the Q in Quit capital and it should work for you...
so just like this :
System.Quit()
__________________
http://img489.imageshack.us/img489/5841/99862310tg8.jpg
Quote:
Originally Posted by qwerty6523
tobias what do you mean by a hump and run
plz explain what that is
Quote:
Originally Posted by jaymes
hump and run.. =] thats called a one night stand
waywardson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2008, 09:58 AM   #7
 
linkinworm's Avatar
 
Join Date: Jan 2008
Posts: 256
Trader Feedback: 0
Default

yes that works for me now, it was just the caps S,Q i always forget its caps sensitive, i usualy make errors because everything is spelt the american way like color, in the UK its colour, theres loads of other words but i cant remember off hand
linkinworm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
exit , lua , make , option , press

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 04:19 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us