Hey every body! I am here because I need help with a game I'm trying to make... I am trying to make a remake of sonic the hedgehog 1
I need help though I have very low programming skills
I need someone to teach me
Welcome and we are all here at your disposa[cough cough] service Ask away!
I'm trying to make my program recall the data it makes you enter. I've try using PRINT "N$", "N$;", ";N$", ";N$;", etc., and none of them work. They all just display a blank space ( ). What do I enter? ---8Program8---
PRINT "Name?"
INPUT N$
CLS
Your name is "N$".
CLS
Please Help!!
Try this:
INPUT "Name"; N$
CLS
PRINT "Your name is " N$
Don't clear the screen (CLS) after printing, as it will erase anything you've output. The INPUT in the beginning will print "Name?" on top of reading input into the variable N$. The question mark is auto generated by INPUT. Notice the semicolon ; is required if you're combining a print and an input like we've done. Print doesn't necessarily require things like commas for printing multiple things (like a quoted string followed by a variable). Try it out!
I just typed what I did for the program part, but my actual game doesn't look like that. It is a long text-based adventure game that recalls your name many times. Can I ever use CLS even once after INPUT "Name"; N$ ? And I noticed N$ was out of the quotation marks (In PRINT "Your name is " N$). I'll have the name in the middle of my sentences, so what do I do then? Sorry I didn't clarify sooner :-S
You can use CLS whenever you like. Even if you use it immediately after input, it'll still capture whatever you typed. As soon as you press "enter", it'll put the input into the variable, then go on to the next line (which could be whatever you want). If you want text before and after when printing, just put more text afterwards. For instance:
PRINT "Your name is " N$ ". That's a funny name."
Notice that N$ is not in the quotations, this is because BASIC will ignore pretty much anything within double quotes and just treat it as actual text. If you want it to be extra clear that N$ is not within the quotes, you can put semicolons between each part. For instance:
PRINT "Your name is "; N$; ". That's a funny name."
Will print the same as the previous one. This one is just more explicit-looking when it comes to the separation of variables and text. You can repeat this pretty much indefinitely, so you can have any combination of text and variables, as long as the variables are not within the double quotes. Hope this helps.
i know somebody here made petit chat. i would like to edit it and make a better user interface. maybe give it some more functionality. i'm already making the interface, , but have another question. how can you make it so the person can choose the name to save the MEM file? might help cuz people might not want to overwrite the existing files, and they could use it as a secret code [as in, if receive MEM.MEM, open and display.]
i know somebody here made petit chat. i would like to edit it and make a better user interface. maybe give it some more functionality. i'm already making the interface, , but have another question. how can you make it so the person can choose the name to save the MEM file? might help cuz people might not want to overwrite the existing files, and they could use it as a secret code [as in, if receive MEM.MEM, open and display.]
If I keep posting replies instead of QR codes, I'm going to get in trouble lol. Anyway, to save files using a variable rather than a hard-coded name, you can do something like this:
INPUT "File name"; NAME$
NAME$="MEM:"+NAME$
SAVE NAME$
And that's it! Notice that I'm prepending the "MEM:" to the front; this is because NAME$ by itself is just the name of the file, but when you save it, you need the type of file as well. Of course, since we haven't altered the MEM$ variable, this will just create an empty file.
OK! Added you.
Also, if you do see me online I'll probably be playing VVVVVV most of the time. Have an obsession with that game that I need to get over. Really.
It's 3 AM here... This is the second time I've been up this late and posted on the internet... I have no life...
I'll stop posting off-topic any day now...
I added your 3DS friend code. Here's mine: 1977-1482-5629 Meaper. Please add me. I'm on my 3DS a lot, 4:00-7:30 p.m. central time on weekdays, and almost all the time on weekends. It's spring break for us right now, so you can find me on regardless. Online games I have are:
Kid Icarus Uprising
Swapnote
Super Mario 3D Land
Streetpass Mii Plaza
I'm going to get Mario Kart 7 sometime around 2013-2014.
I'm going to sleep right now. I'll wake up on March 28 7:00 a.m. central time.
Super Mario 3D Land and Streetpass Mii Plaza aren't online games, and Swapnote's not even a game!
Forums
Topic: Petit Computer QR Code Sharing Thread
Posts 801 to 820 of 1,621
This topic has been archived, no further posts can be added.