Hello, I started by creating a game and my first step is to be able to put your nickname. The problem is that the function never stops even when I finish I can change the name. I think it's due to an error on my part if someone can enlighten me that would be good. Thank you in advance and sorry if there are mistakes I am French, have a nice day.
The game is attached;
Function that does not stop.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 3
- Joined: Mon Aug 15, 2022 9:59 am
Function that does not stop.
- Attachments
-
- pseudo.lua
- (1.2 KiB) Downloaded 57 times
-
- main.lua
- (17 Bytes) Downloaded 58 times
-
- game.lua
- (868 Bytes) Downloaded 51 times
Re: Function that does not stop.
Wow. Um. Not sure where to start.
Ignoring the unusual file structure for a moment.
When I run the script I get big white box. When I click it I get something that captures keystrokes. That actually works so - well done. When I press ENTER, I get a big white circle. Apart from odd behaviour, the text input actually works so not sure how to answer your question. I think your circle is too large. You have radius 50. I made it 10 and I think it works as expected.
When you say the "function never stops" - I don't experience that so perhaps that's a french thing - or not.
Some other tips you didn't ask for:
- having a main.lua with just one line doesn't make a lot of sense. Put more code into main.lua to make it useful. Start by moving love.draw, love.mousepressed, love.update there.
- you have love.draw defined twice. Don't do that.
- don't call REQUIRE in the middle of some function. That's simply confusing. Write a function and then call the function.
I can see you are beginning to understand the basics. Keep trying.
Ignoring the unusual file structure for a moment.
When I run the script I get big white box. When I click it I get something that captures keystrokes. That actually works so - well done. When I press ENTER, I get a big white circle. Apart from odd behaviour, the text input actually works so not sure how to answer your question. I think your circle is too large. You have radius 50. I made it 10 and I think it works as expected.
When you say the "function never stops" - I don't experience that so perhaps that's a french thing - or not.
Some other tips you didn't ask for:
- having a main.lua with just one line doesn't make a lot of sense. Put more code into main.lua to make it useful. Start by moving love.draw, love.mousepressed, love.update there.
- you have love.draw defined twice. Don't do that.
- don't call REQUIRE in the middle of some function. That's simply confusing. Write a function and then call the function.
I can see you are beginning to understand the basics. Keep trying.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: Function that does not stop.
My interpretation of the OP's problem is that after entering the name, they can't move on to something else: the edit control does not stop responding to keys.
Note: I haven't downloaded the code.
Note: I haven't downloaded the code.
-
- Prole
- Posts: 3
- Joined: Mon Aug 15, 2022 9:59 am
-
- Prole
- Posts: 3
- Joined: Mon Aug 15, 2022 9:59 am
Re: Function that does not stop.
infact if it finally works thank you very much for your help, have a nice day.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest