Qbasicnews.com

Full Version: paint program, need help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Too tired to look now, but I started a paint program a few years ago, did about 30 revisions, and took me years to realize that it's pointless.. except for what I learned.
do u still have that paint program, plus anyway im in need of all the experience i can get, plus this paint program is for a game im makin, it uses 16x16 sprites, and i want to allow users to create there own sprite
not sur if u can solve it, i started playing with code and now its just wierd but someof it works, like if u change colour% at top where colour% is defined, it changes the current color, its just the user input and saving/loading
Ack... using GOSUB makes things hard to read. If only for the sake of readability, please use SUBs and FUNCTIONs! They will make your problems easier to solve...
Will look later, but I just need to stab thegrogen for a second.

*STABs* thegrogen.
i was using gosubs, btu it didnt work for some reason, and this doesnt either, if u lok at it it lok rite, but just isnt

Anonymous

no, it doesnt look right because you should be using subs and funcs.

btw fb .14 comes with stabs support ;P Big Grin
stabs support???, well anyway i rarely find a way to make one part work, but then the others dont, im in so need of help, but i wont give up
EDIT..
ok, your code is complete rubbish now...

Example of how to fix. Your code.

Code:
DO
4
i$ = inkey$
IF i$ = "s" OR i$ = "S" THEN LOCATE 6, 1: INPUT "Are you sure you would like to SAVE? Y/N", response$
'IF response$ = "y" OR response$ = "Y" THEN BSAVE
IF response$ = "n" OR response$ = "N" THEN RETURN
IF response$ <> "y" OR response$ <> "Y" or response$ <> "n" OR response$ <> "N" then goto 4
LOOP until i$ = ""

The code you should be using.
Code:
DO
IF i$ = "s" OR i$ = "S" THEN LOCATE 6, 1: INPUT "Are you sure you would like to SAVE? Y/N", response$
response$ = UCASE$(response$)
'IF response$ = "Y" then BSAVE

I$ = INKEY$ assigns the key pressed value to I$ at that moment in time.

Code:
INPUT "statement"; variable1$

...does a keyboard prompt, and the result is stored at the end.. variable1$ in this case.
well someone said that i should use if's in the loop, so i tried putting the whole thing into one big loop, but it didnt do any better, now the screen continuously flickers, maybe ill look for a source code for a paint program out thre and modify it to work with wat i want it to do and giv mucho credit to the creator(s), unless someone can figure out this danm code, it makes sense, until you run it
Pages: 1 2 3 4 5 6