@Phaelax,
Yeah, I'm quite messy with my coding. That's my bad habit. But I said, cheggit out and inform me if you find any errors.
I got somehow fond of this simple program, I even brightened it up a bit. If anybody's stil interested in it...
set display mode 1280,1024,16
type fruittype
name as string
price as float
weight as float
available as boolean `booleans are variables, which can either be 1 or 0 = a bit
color as dword
endtype
dim fruits(10) as fruittype
rem name fruits
fruits(1).name="Bananas"
fruits(2).name="Apples"
fruits(3).name="Peaches"
fruits(4).name="Coconuts"
fruits(5).name="Mangoes"
fruits(6).name="Ananas"
fruits(7).name="Grapes"
fruits(8).name="Grapefruits"
fruits(9).name="Oranges"
fruits(10).name="Lemons"
rem color fruits
fruits(1).color=rgb(255,255,0)
fruits(2).color=rgb(128,255,0)
fruits(3).color=rgb(255,140,0)
fruits(4).color=rgb(128,0,0)
fruits(5).color=rgb(255,64,0)
fruits(6).color=rgb(128,255,0)
fruits(7).color=rgb(255,0,255)
fruits(8).color=rgb(128,255,128)
fruits(9).color=rgb(255,128,0)
fruits(10).color=rgb(200,255,0)
rem game
do
cls
set cursor 200,10
ink rgb(255,255,255),1
print "Fruit Seller:"
set cursor 200,10
print "_____________"
print ""
for t=1 to 10
fruits(t).available=rnd(1)
if fruits(t).available=1
ink fruits(t).color,1
else
ink rgb(64,64,64),1
endif
print fruits(t).name+right$(" :",20-len(fruits(t).name))
if fruits(t).available=1
fruits(t).price=0.5+rnd(20)*0.5-0.01
fruits(t).weight=0.1+rnd(100)/10
print "We can offer "+str$(fruits(t).weight,3)+"kg of "+fruits(t).name
print "The price for the "+fruits(t).name+" is "+str$(fruits(t).price,2)+"$/kg"
else
print fruits(t).name+" are not available right now."
endif
print "=================="
print ""
next t
ink rgb(255,255,255),1
print ""
print ""
print ""
print ""
print "Press any key to actualise the fruit market's statistics."
print "Press ESCAPE to leave."
wait key
sync
loop
Wherever you plan to go,
it's the next step you never know.