I have previously heard about BASIC, but I only just got it after reading a forum post. After doing some tutorials, I am assembling a TBG Gladiator style. I have the first few parts, but later onI may need help with the fighting engine. I don't know, maybe. Anyway, it's going well and thank you to whoeever it was who posted that topic!
Offline
Kay, already run into a problem. See for yourself.
[towncenter]
cls
print "Trade Master: Hello, is there anything you want?"
print "You can go to the ARENA, the ARMORY or the WEAPONSMITH"
input "Where are you bound?---"; destination$
if destination = ARENA then goto [arena]
if destination = ARMOURY then goto[armoury]
if destination = WEAPONSMITH then goto [weaponsmith]
[armory]
cls
print "Armourer: Welcome to my grand shop! What armour are you requiring?"
print "We have some interesting sets. There is currently the NOOB set."
input "What set will you examine? You can exit by typing QUIT"; setfind$
if setfind=NOOB then goto [noobset]
if setfind=QUIT then goto [towncenter]
The problem here is that If i enter ARMOURY, it will say that [arena] does not exist. Arena does not exist because i'm not up to that yet. The only thing that does is armoury, so really, it should go to the armoury when i type that in. I want it to go to [armoury] but it won't. HELP! Also, when I put the $ after the three destinations after the 'if's'. It won't work.
Last edited by Happypieman (2012-04-17 00:24:18)
Offline
Happypieman wrote:
Kay, already run into a problem. See for yourself.
[towncenter]
cls
print "Trade Master: Hello, is there anything you want?"
print "You can go to the ARENA, the ARMORY or the WEAPONSMITH"
input "Where are you bound?---"; destination$
if destination = ARENA then goto [arena]
if destination = ARMOURY then goto[armoury]
if destination = WEAPONSMITH then goto [weaponsmith]
[armory]
cls
print "Armourer: Welcome to my grand shop! What armour are you requiring?"
print "We have some interesting sets. There is currently the NOOB set."
input "What set will you examine? You can exit by typing QUIT"; setfind$
if setfind=NOOB then goto [noobset]
if setfind=QUIT then goto [towncenter]
The problem here is that If i enter ARMOURY, it will say that [arena] does not exist. Arena does not exist because i'm not up to that yet. The only thing that does is armoury, so really, it should go to the armoury when i type that in. I want it to go to [armoury] but it won't. HELP! Also, when I put the $ after the three destinations after the 'if's'. It won't work.
It is [armoury], not [armory].
Offline
trinary wrote:
Happypieman wrote:
Kay, already run into a problem. See for yourself.
[towncenter]
cls
print "Trade Master: Hello, is there anything you want?"
print "You can go to the ARENA, the ARMORY or the WEAPONSMITH"
input "Where are you bound?---"; destination$
if destination = ARENA then goto [arena]
if destination = ARMOURY then goto[armoury]
if destination = WEAPONSMITH then goto [weaponsmith]
[armory]
cls
print "Armourer: Welcome to my grand shop! What armour are you requiring?"
print "We have some interesting sets. There is currently the NOOB set."
input "What set will you examine? You can exit by typing QUIT"; setfind$
if setfind=NOOB then goto [noobset]
if setfind=QUIT then goto [towncenter]
The problem here is that If i enter ARMOURY, it will say that [arena] does not exist. Arena does not exist because i'm not up to that yet. The only thing that does is armoury, so really, it should go to the armoury when i type that in. I want it to go to [armoury] but it won't. HELP! Also, when I put the $ after the three destinations after the 'if's'. It won't work.It is [armoury], not [armory].
nonono, you see, I was editing that in the forum. It is armory everywhere else. I just edited that in the forums.
Offline
trinary wrote:
Which version of BASIC are you using?
justBasic
Offline
What seems to be the problem?
It runs perfectly.
[towncenter]
cls
print "Trade Master: Hello, is there anything you want?"
print "You can go to the ARENA, the ARMOURY or the WEAPONSMITH"
input "Where are you bound?---"; destination$
if destination = ARMOURY then goto[armoury]
if destination = WEAPONSMITH then goto [weaponsmith]
if destination = ARENA then goto [arena]
[armoury]
cls
print "Armourer: Welcome to my grand shop! What armour are you requiring?"
print "We have some interesting sets. There is currently the NOOB set."
input "What set will you examine? You can exit by typing QUIT"; setfind$
if setfind = QUIT then goto [towncenter]
if setfind = NOOB then goto [noobset]
Last edited by trinary (2012-04-17 01:59:27)
Offline
[towncenter]
cls
print "Trade Master: Hello, is there anything you want?"
print "You can go to the ARENA, the ARMOURY or the WEAPONSMITH"
input "Where are you bound?---"; destination$
if destination = ARMOURY then goto[armoury]
if destination = WEAPONSMITH then goto [weaponsmith]
if destination = ARENA then goto [arena]
[armoury]
cls
print "Armourer: Welcome to my grand shop! What armour are you requiring?"
print "We have some interesting sets. There is currently the NOOB set."
input "What set will you examine? You can exit by typing QUIT"; setfind$
if setfind = QUIT then goto [towncenter]
if setfind = NOOB then goto [noobset]
I type Arena and it goes to the armoury now.
Offline
Happypieman wrote:
[towncenter]
cls
print "Trade Master: Hello, is there anything you want?"
print "You can go to the ARENA, the ARMOURY or the WEAPONSMITH"
input "Where are you bound?---"; destination$
if destination = ARMOURY then goto[armoury]
if destination = WEAPONSMITH then goto [weaponsmith]
if destination = ARENA then goto [arena]
[armoury]
cls
print "Armourer: Welcome to my grand shop! What armour are you requiring?"
print "We have some interesting sets. There is currently the NOOB set."
input "What set will you examine? You can exit by typing QUIT"; setfind$
if setfind = QUIT then goto [towncenter]
if setfind = NOOB then goto [noobset]I type Arena and it goes to the armoury now.
Is this a problem?
If it is, use an if/else.
Offline
Happypieman wrote:
trinary wrote:
Which version of BASIC are you using?
justBasic
You should buy Liberty BASIC. (Made by the same people.) You can compile programs and run run larger programs with it!
Offline
nathanprocks wrote:
Happypieman wrote:
trinary wrote:
Which version of BASIC are you using?
justBasic
You should buy Liberty BASIC. (Made by the same people.) You can compile programs and run run larger programs with it!
EDIT: I found your problem. You forgot the quotation marks and the $ symbols. I also made your code better so if you type "aReNa", it will still go to the branch label "arena".
[towncenter] cls print "Trade Master: Hello, is there anything you want?" print "You can go to the ARENA, the ARMOURY or the WEAPONSMITH" input "Where are you bound?---"; destination$ if lower$(destination$) = "armoury" then goto[armoury] if lower$(destination$) = "weaponsmith" then goto [weaponsmith] if lower$(destination$) = "arena" then goto [arena] [armoury] cls print "Armourer: Welcome to my grand shop! What armour are you requiring?" print "We have some interesting sets. There is currently the NOOB set." input "What set will you examine? You can exit by typing QUIT"; setfind$ if lower$(setfind$) = "quit" then goto [towncenter] if lower$(setfind$) = "noob" then goto [noobset]
EDIT: Oops, I quoted instead of editing lol.
Last edited by nathanprocks (2012-04-17 06:54:25)
Offline
maxskywalker wrote:
Happypieman wrote:
Kay, already run into a problem. See for yourself.
[towncenter]
cls
print "Trade Master: Hello, is there anything you want?"
print "You can go to the ARENA, the ARMORY or the WEAPONSMITH"
input "Where are you bound?---"; destination$
if destination = ARENA then goto [arena]
if destination = ARMOURY then goto[armoury]
if destination = WEAPONSMITH then goto [weaponsmith]
[armory]
cls
print "Armourer: Welcome to my grand shop! What armour are you requiring?"
print "We have some interesting sets. There is currently the NOOB set."
input "What set will you examine? You can exit by typing QUIT"; setfind$
if setfind=NOOB then goto [noobset]
if setfind=QUIT then goto [towncenter]
The problem here is that If i enter ARMOURY, it will say that [arena] does not exist. Arena does not exist because i'm not up to that yet. The only thing that does is armoury, so really, it should go to the armoury when i type that in. I want it to go to [armoury] but it won't. HELP! Also, when I put the $ after the three destinations after the 'if's'. It won't work.Well I see one major problem. You say goto armoury but the definition is armory.
I edited that in the forums, it's all spelt armory in it.
Offline
trinary wrote:
Once you have learnt enough BASIC, I really recommend moving onto another language.
BASIC is just so...basic.
And the syntax so...lax.
I will, i'm doing Python in Digital Tehnology.
Offline