CharlieO1212 said:
It does work but when i press "w" it keeps adding a "-" to my figure. When i press "s" it does not have this problem so i was wondering how to change it so when i press "w" it moves over and does not print extra lines "-".
Check to see if there are any small differences between the "s" and "w" lines. I tried to make both those the same so that each would print two spaces over the top of the old "<-" to cover that up. Maybe you have a small typo. Or maybe there are subtle things that I can't guess.
I'm not actually running any of this, I'm doing all this in my head and that makes it very easy for a mistake to slip past me.
CharlieO1212 said:
Also if i assigned a variable to the "<-" and said if "<-" is =80,25 then turn around or something like that in code that should work right?
I was thinking perhaps something like
80 if s$ = "w" then if x>0 then gotoxy x,y:print " ":let x=x-1:gotoxy x,y:print "<-"
90 if s$ = "s" then if x<25 then gotoxy x,y:print " ":let x=x+1:gotoxy x,y:print "<-"
or you might be able to use
80 if s$ = "w" and x>0 then gotoxy x,y:print " ":let x=x-1:gotoxy x,y:print "<-"
90 if s$ = "s" and x<25 then gotoxy x,y:print " ":let x=x+1:gotoxy x,y:print "<-"
but you then need to start learning how AND and OR work.
That would only move up as long as you were not on the top line already and only move down as long as you were not on the bottom line already. But there are other ways to accomplish the same thing and anything that doesn't let x,y exceed the boundaries of the screen will be fine.
It sounds like you are making progress. I hope it works out for you.
Note: It looks like the posting process is eating my double spaces and replacing those with a single space. Watch out. This posting software does a variety of little things like that. It is possible to put code inside a box where it isn't supposed to mess with the characters, but I've never taken the time to figure out how to do that, or to learn how to use reverse slant italic bold gothic font supersubscripts either. ASCII text used to be good enough.