Ok, I'm working on a game, and I'm currently writing the database portion, but to test it on the game, I need to create a database. Since I have no idea how to do this manually, I wrote a small program to write a database for testing. However, whenever I run it, it just displays:
DBWrite v0.01
1 - Item chart
2 - Price chart
3 - Descrip chart
4 - Quit
Choice>1
Loading file 'media/item-08.dat
File opened...
Wrote succesfully!
1 - Item chart
2 - Price chart
3 - Descrip chart
4 - Quit
I think either my FOR loop is malformed or my write string is malformed. Can someone please explain what I'm doing wrong please! Thanks is greatly appreciated.
REM DBWrite
print "DBWrite v0.01"
`open to write 1, "media/item-08.dat"
`write string 1, "I'm an idiot"
`close file 1
`end
cmd:
print "1 - Item chart"
print "2 - Price chart"
print "3 - Descrip chart"
print "4 - Quit"
input "Choice>";cmd
if cmd=1 then goto item
if cmd=2 then goto price
if cmd=3 then goto descrip
if cmd=4 then end
print "invalid command"
goto cmd
item:
cat=1
ID=1
print "Loading file 'media/item-08.dat'"
open to write 1, "media/item-08.dat"
print "File opened..."
for cat=1 to cat=17
for ID=1 to ID=64
print "(";cat;",";ID;")"
input ">";in$
write string 1,in$
next ID
next cat
close file 1
print "Wrote succesfully!"
goto cmd
price:
descrip:
print "Not yet implemented..."
goto cmd
print "I am a complete moron!!!!!!! I can't even follow simple directions!!!!"
print "press any key to KILL ME!!"
suspend for key
end