oh sorry i thought the bit below that states 'code' was the bit u put ur code in - silly me...
show mouse
startprogram:
cls
rem Ask the user for their name
input "enter your name: ";name$
rem Respond to name input
print "hello ";name$
rem Ask the user for their age
input "enter your age: ";age$
rem respond to age input
print "Ok you are " ;age$
rem i've added a confirmation, just in case somebody types something wrong
print "confirm? (left click to confirm, right click to restart program)"
DO
rem Check for left mouse button
if mouseclick()=1
rem jump to save label
gosub SAVE_DETAILS:
endif
rem Check for right mouse button
if mouseclick()=2
rem jump to start
gosub startprogram:
endif
LOOP
rem time to save details for later
SAVE_DETAILS:
cls
rem confirm save?
print "save details? (left click to save, right click to continue without saving)"
DO
rem check for left mouse button
if mouseclick()=1
rem jump to save 2 label
gosub save_2:
endif
rem check for right mouse button
if mouseclick()=2
rem jump to continue_without_save
gosub continue_without_save:
rem time to actually save the file
save_2:
rem Set filename
loadfile$="profile.lambingcalculator"
rem create file
if file exist("profile.lambingcalculator")=0
make file "profile.lambingcalculator"
gosub writeprofile:
else
print "file already exists... do you want to overwrite? (left click to confirm, rightclick to deny)"
gosub fileexists:
endif
fileexists:
DO
rem check for left mouse button
if mouseclick()=1
rem overwrite file
gosub overwrite:
endif
LOOP
DO
rem check for right mouse button
if mouseclick()=2
rem jump to continue_without_save
gosub continue_without_save:
endif
LOOP
overwrite:
delete file "profile.lambingcalculator"
make file "profile.lambingcalculator"
gosub writeprofile:
continue_without_save:
(real forum name s0l1idsnak3123)