Search found 8 matches

by PiadinaAlexo
Sun Aug 07, 2016 7:26 pm
Forum: Support and Development
Topic: Returning to a previous .lua file
Replies: 10
Views: 5530

Re: Returning to a previous .lua file

Oh, I got that. Thanks, you helped me out a LOT. :awesome:
by PiadinaAlexo
Sun Aug 07, 2016 6:57 pm
Forum: Support and Development
Topic: Returning to a previous .lua file
Replies: 10
Views: 5530

Re: Returning to a previous .lua file

Oh, I see. Thanks! By the way, I still encounter a problem. I have removed the local to the tables, but when i run the .love project, it graphically shows MainMenu, but the commands that I can use are the ones for PlayMenu. That's kinda odd, since i've set "MainMenu" as the currentState at...
by PiadinaAlexo
Sun Aug 07, 2016 5:47 pm
Forum: Support and Development
Topic: Returning to a previous .lua file
Replies: 10
Views: 5530

Re: Returning to a previous .lua file

Here it is.
by PiadinaAlexo
Sun Aug 07, 2016 5:11 pm
Forum: Support and Development
Topic: Returning to a previous .lua file
Replies: 10
Views: 5530

Re: Returning to a previous .lua file

I have checked, and i have created all the tables in the other .lua files. I still don't get this. Every table i have created has always been created like this:

Code: Select all

-- in MainMenu.lua
MainMenu = {}
-- in PlayMenu.lua
PlayMenu = {}
by PiadinaAlexo
Sun Aug 07, 2016 4:24 pm
Forum: Support and Development
Topic: Returning to a previous .lua file
Replies: 10
Views: 5530

Re: Returning to a previous .lua file

Thank you for your answer, I have edited the file but there's still a problem with : function love.draw() currentState.draw() end Love says: "attempt to index global 'currentState' (a nil value) Traceback in function 'draw' [C]: in function 'xpcall'" I don't understand why, but it keeps gi...
by PiadinaAlexo
Sun Aug 07, 2016 1:50 pm
Forum: Support and Development
Topic: Returning to a previous .lua file
Replies: 10
Views: 5530

Returning to a previous .lua file

Hello there, i'm currently working on a game, and I'm new to Lua. I am working on the main menu, and when i select the "play" button,via the require function, it brings me to the play.lua file. The problem is that i want to return to the previous menu.lua file, but with the require functio...
by PiadinaAlexo
Sat Aug 06, 2016 2:49 pm
Forum: Support and Development
Topic: Running multiple .lua files in a game?
Replies: 2
Views: 2405

Running multiple .lua files in a game?

Hello, I'm new to Lua and Love2D, and basically I'm trying to make the "main menu" as the first thing,but basically since the main.lua file would be very long i wanted to make another .lua file, called "menu.lua". But when I run the entire folder, nothing happens: only black scre...