essentially the issue is ancient coding state, remember to use functions rather than the primitive goto/gosub
oh and indentation is real nice to have
i presume this is how you meant it to be
sync on : sync rate 0 :
init()
Gather()
repeat
IF upkey()=1
Gather()
INC seed_base,1
endif
sync
until downkey()=1
end
function init()
//Color Constant Library Courtesy Mr909
#CONSTANT col_white RGB(255,255,255)
#CONSTANT col_black RGB(0,0,0)
#CONSTANT col_gray RGB(128,128,128)
#CONSTANT col_red RGB(255,0,0)
#CONSTANT col_green RGB(0,255,0)
#CONSTANT col_blue RGB(0,0,255)
#CONSTANT col_yellow RGB(255,255,0)
DIM graph_one(100)
DIM graph_two(100)
DIM graph_three(100)
DIM dice(20)
DIM exclude(10)
DIM bottom(10)
//Setups
SYNC RATE 60
SYNC ON
seed_base=1
RANDOMIZE seed_base
SET WINDOW SIZE 640,480
//Variable Setups
count=0
GLOBAL bx
GLOBAL by
bx=64
by=400
//Make sure all values are reset
FOR a=1 to 100
graph_one(a)=0
NEXT a
FOR a=1 to 100
graph_two(a)=0
NEXT a
FOR a=1 to 100
graph_three(a)=0
NEXT a
range=0
print "v"
endfunction
function Gather()
RANDOMIZE seed_base
FOR cl=1 TO 10
//Calculation Steps
CLS
INK col_white,col_black
sub=0
//Clear the dice totals and bottom bars so they total correctly
total_one=0
total_two=0
total_three=0
//Total range one
GTenRand()
FOR adit=1 TO 10
INC total_one,dice(adit)
NEXT adit
//Total range two
//NOTE: Includes the excluded indexes. They are subtracted seperately.
GTenRand()
FOR adit=1 TO 10
INC total_two,dice(adit)
NEXT adit
range=12
Glowest()
sub=0
FOR s=1 TO 2
INC sub,bottom(s)
NEXT s
DEC total_two,sub
//Total range three (drops 4 lowest)
//NOTE: Includes the excluded indexes. They are subtracted seperately.
GTenRand()
FOR adit=1 TO 10
INC total_three,dice(adit)
NEXT adit
range=14
Glowest()
sub=0
FOR s=1 TO 4
INC sub,bottom(s)
NEXT s
DEC total_three,sub
//Graph 'dem crazeh results! :D :D :D
INC graph_one(total_one),1
INC graph_two(total_two),1
INC graph_three(total_three),1
INC count
NEXT cl
//Drawing The Graph
CLS
INK col_white,col_black
CENTER TEXT 32,32,"Count:"
CENTER TEXT 32,48,STR$(count)
INK col_green,col_black
FOR pnt=2 TO 100
LINE bx+(5*(pnt-1)),by-(graph_one(pnt-1))/5,bx+(5*pnt),by-(graph_one(pnt))/5
NEXT pnt
INK col_yellow,col_black
FOR pnt=2 TO 100
LINE bx+(5*(pnt-1)),by-(graph_two(pnt-1))/5,bx+(5*pnt),by-(graph_two(pnt))/5
NEXT pnt
INK col_red,col_black
FOR pnt=2 TO 100
LINE bx+(5*(pnt-1)),by-(graph_three(pnt-1))/5,bx+(5*pnt),by-(graph_three(pnt))/5
NEXT pnt
endfunction
function Glowest()
//Clear excluded indexes and bottom numbers to ensure randoms don't pick duplicated indexes
FOR ex=1 TO 10
exclude(ex)=0
NEXT ex
FOR bt=1 TO 10
bottom(bt)=0
NEXT bt
//EXCLUDE LOWEST
FOR b=1 TO 10
FOR a=1 TO range AND (a=exclude())=0
IF dice(a)<bottom(b)
bottom(b)=dice(a)
exclude(b)=a
ENDIF
NEXT a
NEXT b
endfunction
function GTenRand()
FOR di=1 TO 20
dice(di)= RND(9)+1
NEXT di
endfunction
function GTwentyRand()
FOR di=1 TO 20
dice(di)= RND(19)+1
NEXT di
endfunction
// ???
FUNCTION gridlines()
INK col_gray,col_black
ENDFUNCTION