Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
paint program, need help
#11
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.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#12
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
Reply
#13
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
Reply
#14
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...
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Reply
#15
Will look later, but I just need to stab thegrogen for a second.

*STABs* thegrogen.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#16
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
Reply
#17
no, it doesnt look right because you should be using subs and funcs.

btw fb .14 comes with stabs support ;P Big Grin
Reply
#18
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
Reply
#19
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.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#20
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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)