Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] Having a strange issue and need help.

Author
Message
RobPugh0829
9
Years of Service
User Offline
Joined: 7th Feb 2016
Location:
Posted: 10th Jan 2025 05:07
I'm attempting to get user input from the user. Basically I want them to type something and it shows up on the screen. The problem is, if I type A it just loops print a over and over until I hit another key which it does the same thing. Can anybody show me how to do a simple text input like I want? Sorry, sounds noobish, but it's kicking my butt.

The author of this post has marked a post as an answer.

Go to answer

Loktofeit
AGK Developer
16
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Sarasota, FL
Posted: 10th Jan 2025 07:43
Would you be able to share the code in question? It would help us find either the error or some helpful solutions for you.
LynxJSA's web games/quizzes - LynxJSA's Android apps
AGK Resource Directory
"Stick to a single main loop (DO...LOOP) and loop through it every frame.
Do everything inside functions.
Use finite state machines to control your game.
Use lots and lots of source files.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Jan 2025 19:22
This post has been marked by the post author as the answer.
We cannot tell you what's wrong with your code if you don't show it to us. Here's a simplistic example of text input I pulled out of my irc client. This does not consider TAB or Backspace. (actually it might consider tab and PRINT simply doesn't display it, I don't know).



Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

RobPugh0829
9
Years of Service
User Offline
Joined: 7th Feb 2016
Location:
Posted: 10th Jan 2025 22:15
Thank you, I didn't know about the char buffer for some reason and that worked. Thank you so much! Oh, and I realized some time today that I forgot to post my code with the question. My bad, I will do that next time.

Login to post a reply

Server time is: 2025-06-01 03:39:22
Your offset time is: 2025-06-01 03:39:22