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!

Lua Error - pretty simple, really

This is a discussion on Lua Error - pretty simple, really within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Code: start menu = Image.load("images/start menu.png") -->the start menu, only comes during gameplay Error: '=' expected near 'menu' that code ...

Reply
 
LinkBack Thread Tools
Old 04-07-2006, 02:47 PM   #1
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default Lua Error - pretty simple, really - not anymore, got harder

Code:
start menu = Image.load("images/start menu.png") -->the start menu, only comes during gameplay
Error: '=' expected near 'menu'

that code looks perfect to me. (everybody thinks its perfect until an error is pointed out)

did i use a word that luaplayer automatically recognizes as a command of some sort?
(you know, like 'if' and 'then' and 'else')
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

Last edited by EminentJonFrost; 04-08-2006 at 12:36 PM.. Reason: misleading title - it WAS simple, not anymore
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 02:55 PM   #2

Tha Sigerator
 
Xodiac21's Avatar
 
Join Date: Jul 2005
Location: New Orleans, LA
Posts: 4,047
Trader Feedback: 0
Default

umm hmm.....can u use 2 words (start menu)...try without a space (startmenu)
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -

Check Out My Myspace HERE
Comment My Qj Wiki
Xodiac21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 02:57 PM   #3

Is in your zone.
 
Mast3r_Shak3's Avatar
 
Join Date: Oct 2005
Location: Jacksonville, FL
Posts: 3,429
Trader Feedback: 0
Default

I didnt think you could have "/" in a filename and dont have a space
__________________

--XBL Gamertag: PhenoM904--
Mast3r_Shak3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 02:58 PM   #4
11th Squad Captain
 
c5cha7's Avatar
 
Join Date: Jun 2005
Location: You are here -----> 名前: アダム | 飲むコー&#1
Posts: 2,562
Trader Feedback: 0
Default

start menu = Image.load("images/start menu.png")
has tobe
startmenu = Image.load("images/start menu.png")
__________________
FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
c5cha7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 02:58 PM   #5

Gutya
 

 
Join Date: Feb 2006
Posts: 2,398
Trader Feedback: 0
Default

Of course you can have a / in a path.
__________________
D:
Gutya is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:00 PM   #6
 
Join Date: Sep 2005
Location: meh
Posts: 2,799
Trader Feedback: 0
Default

yes, youre using a space in variable name...that should never happen
cyanide is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:02 PM   #7
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

oh ok, thanks c5cha7, xodiac21, and cyanide!

To: MaSt3r_ShAk3
Yea, you can.
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:07 PM   #8

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

Or as all great coders do, to signify a space when coding, use the handy dandy underscore _!_!_!_!

start_menu = Image.load("image/start menu.png")
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:11 PM   #9
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

Code:
if StartMenuSelection = 1 then
now i get this error:

'then' expected near '='

?
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:12 PM   #10
11th Squad Captain
 
c5cha7's Avatar
 
Join Date: Jun 2005
Location: You are here -----> 名前: アダム | 飲むコー&#1
Posts: 2,562
Trader Feedback: 0
Default

Quote:
Originally Posted by EminentJonFrost
Code:
if StartMenuSelection = 1 then
now i get this error:

'then' expected near '='

?
Code:
if StartMenuSelection == 1 then
screen:print(5,5,"That will work.")
end
you left out the extra = next to 1.
__________________
FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
c5cha7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:16 PM   #11

Tha Sigerator
 
Xodiac21's Avatar
 
Join Date: Jul 2005
Location: New Orleans, LA
Posts: 4,047
Trader Feedback: 0
Default

Quote:
Originally Posted by EminentJonFrost
Code:
if StartMenuSelection = 1 then
now i get this error:

'then' expected near '='

?
Code:
if StartMenuSelection == 1 then
should be like this instead
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -

Check Out My Myspace HERE
Comment My Qj Wiki
Xodiac21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:16 PM   #12

Save The World
 

 
Join Date: Oct 2005
Location: Bedford, England
Posts: 1,389
Trader Feedback: 0
Default

Quote:
Originally Posted by c5cha7
Code:
if StartMenuSelection == 1 then
screen:print(5,5,"That will work.")
end
you left out the extra = next to 1.
Yes, whenever you are comparing a variable like an if statemeny, you will always need two =.
__________________
Vaza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:18 PM   #13
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

whoooo!
ok i see the problem.

man!
i amaze myself at how little attention i pay to the important details...

oh, thanks (again) xodiac21 and c5cha7!

edit - you too Vaza! thanks!
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:19 PM   #14
11th Squad Captain
 
c5cha7's Avatar
 
Join Date: Jun 2005
Location: You are here -----> 名前: アダム | 飲むコー&#1
Posts: 2,562
Trader Feedback: 0
Default

Quote:
Originally Posted by EminentJonFrost
whoooo!
ok i see the problem.

man!
i amaze myself at how little attention i pay to the important details...

oh, thanks (again) xodiac21 and c5cha7!
If you have problem's and see me online just PM me and i will aid
to your attention .
__________________
FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
c5cha7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:22 PM   #15
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

Quote:
Originally Posted by c5cha7
If you have problem's and see me online just PM me and i will aid
to your attention .

appreciate that!

(an offer you may regret offering when i get to more complicated matters...lol)
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:24 PM   #16
11th Squad Captain
 
c5cha7's Avatar
 
Join Date: Jun 2005
Location: You are here -----> 名前: アダム | 飲むコー&#1
Posts: 2,562
Trader Feedback: 0
Default

Quote:
Originally Posted by EminentJonFrost

appreciate that!

(an offer you may regret offering when i get to more complicated matters...lol)
Dont worry lol.
As of know i love coffee so i will be active for a
extra 24 hours lol...

Anyways good luck with whatever your doing!
i hope you develop something neat soon .
(its nice to see people using lua)
__________________
FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
c5cha7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:26 PM   #17

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

Let me guess... another shell?

I mean... start_menu... what else?
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:28 PM   #18
 
Soulphalanx's Avatar
 
Join Date: Sep 2005
Location: TROY
Posts: 2,989
Trader Feedback: 0
Default

a menu that starts the game? :icon_razz
__________________
[IMG]http://img121.imageshack.us/img121/3852/untitled1copy7rf.png[/IMG] [IMG]http://img99.imageshack.us/img99/9711/newavatarjb9.gif[/IMG]


[URL=http://forums.qj.net/showthread.php?t=9733][COLOR=DarkRed]Operation Positive Posting[/COLOR][/URL] [URL=http://forums.qj.net/showthread.php?t=49762][COLOR=Red]Guide to All Guides[/COLOR][/URL]
[URL=http://forums.qj.net/showthread.php?t=13798][COLOR=Blue]Posting Guidelines[/COLOR][/URL] [URL=http://forums.qj.net/showthread.php?t=4394][COLOR=Green]Piracy Policy[/COLOR][/URL]

[SIZE="3"][URL=http://forums.qj.net/f-general-psp-help-22/t-guide-opening-psp-disassembly-assembly-video-104303.html][COLOR=Red][B][U]PSP Disassembly Assembly Video Tutorial[/U][/B][/COLOR][/URL][/SIZE]
Soulphalanx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:30 PM   #19
11th Squad Captain
 
c5cha7's Avatar
 
Join Date: Jun 2005
Location: You are here -----> 名前: アダム | 飲むコー&#1
Posts: 2,562
Trader Feedback: 0
Default

Quote:
Originally Posted by youresam
Let me guess... another shell?

I mean... start_menu... what else?
I was thinking a main game menu lol...
I guess i am very stupid at guessing stuff,
and usually when i do guess i get it wrong anyways...

Off-Topic:
What are you working on youresam?
anything cool or new?
__________________
FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
c5cha7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:32 PM   #20

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

Oh, a main game menu..ok.

Right now im working on Wario Ware PSP! I got the menu finished, advcontlib finished, and the GU perfected! (Yeah..I learned 3D programming JUST for this!)
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:33 PM   #21

Save The World
 

 
Join Date: Oct 2005
Location: Bedford, England
Posts: 1,389
Trader Feedback: 0
Default

Quote:
Originally Posted by c5cha7
I was thinking a main game menu lol...
I guess i am very stupid at guessing stuff,
and usually when i do guess i get it wrong anyways...

Off-Topic:
What are you working on youresam?
anything cool or new?
Look at his sig. :icon_wink
__________________
Vaza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:35 PM   #22
11th Squad Captain
 
c5cha7's Avatar
 
Join Date: Jun 2005
Location: You are here -----> 名前: アダム | 飲むコー&#1
Posts: 2,562
Trader Feedback: 0
Default

Quote:
Originally Posted by Vaza
Look at his sig. :icon_wink
Well everyone knows i am lazy and dumb lol....
:icon_razz Oh and thanks for letting me steal your
MSN smileys lol .
I will use them wisley!
__________________
FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
c5cha7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:38 PM   #23

Save The World
 

 
Join Date: Oct 2005
Location: Bedford, England
Posts: 1,389
Trader Feedback: 0
Default

Quote:
Originally Posted by c5cha7
Well everyone knows i am lazy and dumb lol....
:icon_razz Oh and thanks for letting me steal your
MSN smileys lol .
I will use them wisley!
I STILL dont approve of that...
__________________
Vaza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 03:38 PM   #24
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

sorry to burst your bubbles people...but i'm not making a shell.
c5cha7, your guess was right. (youre not as bad as you think!)
its a start menu for game.
(pause game, menu comes out with options...get the idea? lol)
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 04:14 PM   #25
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

new problem now..and its not so simple.
(its not the coding)

when i press start, the screen clears entirely and shows just the menu.
now, this menu has (just) two options.
one is to continue, another is supposed to show an error message i made saying that the function isnt implemented yet. (for convienience, and to serve as an explanation so that i dont have to explain myself later)

what i am testing here is: the error message.

i can at least get to it (sorta, i'll explain), but its not clean looking at all. the start menu doesnt cleanly show up, its missing half the photo and the words dont appear at all (but it still follows through with their functions when i call them).

when i do the function that doesnt work yet, the error message is supposed to show up.
this is where things just get uglier.
the half-shown-but-isnt-supposed-to-be-there-now start menu is still there, and my error pic is blitting like crazy at the bottom of the screen.

*takes a deep breath*
now what do i do?

(c5cha7, i wont hold you to your offer, yet. you can still get out before its too late! lol)

EDIT - I'll post the code if i have to, but i warn you. its pretty big.
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

Last edited by EminentJonFrost; 04-07-2006 at 04:17 PM..
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 04:27 PM   #26

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

I need your code. Just paste it all... I can sort through it
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 04:40 PM   #27
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

ooo kkk...

Quote:
-->\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\
-->Begin Intro
-->Load images and variables
-->//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

System.usbDiskModeActivat e()
white = Color.new(255, 255, 255)
red = Color.new(255, 0, 0)
ejf = Image.load("images/ejf.png") -->this is what shows up in the credits
mmenu = Image.load("images/main menu.png") -->self explanetory
loading = Image.load("images/loading....png") -->self explanetory
map = Image.load("images/simple map.png") -->again (lol) self explanetory
units = Image.load("images/units.png") -->one picture with all unit sprites
notice_pic = Image.load("images/notice!.png") -->pic that pops up when user must know something
start_menu = Image.load("images/start menu.png") -->the start menu, only comes during gameplay
menu_selection = 1 -->Main Menu variable
start_menu_selection = 1 -->Start menu variable

-->\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\
-->Small Intro: it just says 'Loading'
-->////////////////////////////////////////////////////////////////////////////////////////////////

screen:blit(200, 125, loading)
screen.flip()
screen.waitVblankStart(60 )

screen:clear()
screen.flip()
screen:clear()

-->\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\
-->Done Loading Images
-->Defining Functions
-->////////////////////////////////////////////////////////////////////////////////////////////////

-->'Notice' or 'Error' function\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \

function notice()

while true do
screen:clear()
screen:blit(0, 0, notice_pic)
screen.flip()
screenrint(100, 80, "This button doesnt work yet.", red)
screenrint(100, 90, "Still working on it!", red)
screenrint(100, 100, "When it works it will:", red)
screenrint(100, 110, "Leave game to Lua Apps browser.", red)
screenrint(100, 130, "Press X to continue", white)
screen.waitVblankStart()

if pad:cross() then
break
end
end
end

-->end of 'Notice' or 'Error' function/////////////////////////////////////////////////////////////


-->Press 'Start' Function - This function is used in mid-game only\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\

function pressStart()

while true do

pad = Controls.read()
screen:clear()
screen:blit(199, 119, start_menu)
screen.flip()
screen.waitVblankStart()

if pad:up() then
start_menu_selection = start_menu_selection + 1
if start_menu_selection > 1 then
start_menu_selection = 1
end
end

if pad:down() then
start_menu_selection = start_menu_selection - 1
if start_menu_selection < 1 then
start_menu_selection = 0
end
end

if start_menu_selection == 1 then
screenrint(222, 122, "Continue", red)
screenrint(222, 132, "Exit Game", white)
end

if start_menu_selection == 0 then
screenrint(222, 122, "Continue", white)
screenrint(222, 132, "Exit Game", red)
end

if pad:cross() then
if start_menu_selection == 1 then
break
end

if start_menu_selection == 0 then
notice()
end
end

if pad:start()then
break
end
end
end
-->end of press 'start' function///////////////////////////////////////////////////////////////////

-->The "Start Game" function\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\

function game()

screen:clear()

while true do
pad = Controls.read()
screen:blit(0, 0, map) -->make map appear (dur!)
screen:blit(220, 220, units, 0, 0, 31, 31, true) -->make a single red unit appear facing up
screen.flip()
screen.waitVblankStart()

if pad:start() then
screen:clear()
screen.flip()
screen:clear()
pressStart()
end
end
end

-->end of "Start Game" function////////////////////////////////////////////////////////////////////

-->The "Show Credits" function\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\

function showcredits()

screen:clear()
while true do
pad = Controls.read()
screen:blit(0, 0, ejf) -->show credits
screen.flip()
screen.waitVblankStart()

if pad:circle() then
break
end

end
end

-->end of "Show Credits" function//////////////////////////////////////////////////////////////////

-->\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\
-->End Intro
-->End loading and defining
-->Begin Main Menu
-->//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

while true do

pad = Controls.read()

if pad:up() then
menu_selection = menu_selection + 1
if menu_selection >= 2 then
menu_selection = 2
end
end

if pad:down() then
menu_selection = menu_selection - 1
if menu_selection < 1 then
menu_selection = 0
end
end

screen:clear()
screen:blit(0, 0, mmenu)

if menu_selection == 1 then
screenrint(180, 130, ">Start Game", red)
screenrint(180, 140, "Credits", white)
if pad:cross() then
game()
end

end

if menu_selection == 2 then
screenrint(180, 130, ">Start Game", red)
screenrint(180, 140, "Credits", white)
if pad:cross() then
game()
end
end

if menu_selection == 0 then
screenrint(180, 130, "Start Game", white)
screenrint(180, 140, ">Credits", red)
if pad:cross() then
showcredits()
end
end

screen:flip()
screen.waitVblankStart()
end

-->\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\
-->End of Main Menu
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 05:18 PM   #28
 
PopcOrn DeVil's Avatar
 
Join Date: Jan 2006
Location: Western Australia
Posts: 1,044
Trader Feedback: 0
Default

Could it be the double ends?
PopcOrn DeVil is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 05:26 PM   #29

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

You forgot to redefine "pad" in the function "notice()", and you left out screen.flip() in function "pressStart()"

Your welcome.

EDIT: Actually, shouldnt you NOT have a while loop in "notice()"?
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth

Last edited by youresam; 04-07-2006 at 05:34 PM..
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 04:53 AM   #30
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

Quote:
Originally Posted by youresam
You forgot to redefine "pad" in the function "notice()", and you left out screen.flip() in function "pressStart()"

Your welcome.

EDIT: Actually, shouldnt you NOT have a while loop in "notice()"?
well if i dont, then i start to get problems with how many 'ends' there are, or that an 'end' doesnt have a loop to stop.

ok, doing what you said helped somewhat. now at least the screen clears what wasnt needed anymore (which was the game). but it still buggy on showing the start menu and the notice.

the text doesnt even show (during the start menu).

hmm...i may have to get rid of the start menu and make another. does it matter if when making the pic, i used less opacity on a color?

(i'm gonna try blitting the start menu without removing the game from the picture to see what happens.)

the notice pic shows up several times along the side of the screen except its starts very small on top and gets bigger on the way down. but the message i put (the text) comes up fine.
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
error , lua , pretty , simple

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 07:12 AM.



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