Here's a code snippet:
function savelevel
drawscreen(ox,oy,Sel)
done = 0
do
ink rgb(175,175,175),0
box 220,200,420,280
ink rgb(255,255,255),rgb(175,175,175)
set cursor 225,205
print "Please name file to save to:"
set cursor 225,215
input file$
cls
drawscreen(ox,oy,Sel)
if file exist(file$) = 0 then done = 1
if file exist(file$) > 0
ink rgb(175,175,175),0
box 220,200,420,280
ink rgb(255,255,255),rgb(175,175,175)
set cursor 225,205
print "That file already exists!! Overwrite?"
set cursor 225,225
print " YES NO "
line 225, 224, 225, 236; line 255, 224, 255, 236; line 225, 224, 255, 224; line 225, 236, 255, 236
line 300, 224, 300, 236; line 325, 224, 325, 236; line 300, 224, 325, 224; line 300, 236, 325, 236
cls
drawscreen(ox,oy,Sel)
endif
loop until done = 1
endfunction
Here's the problem. The loop won't work! can you not use loops inside a function? if that's true, why not! any suggestions how to bypass this?
-Thanx
ps.
Probably would help if I detailed the error!
It says Error#100013: Command out of place at line 190.
(line 190 is loop until done = 1)
This makes me think that I started something somewhere that i didn't end, but as you can see it is all nicely layed out, and complete!
Help!
So many games... so little time!