So for school I'm making a project with small basic, idea is very simple, just like my question. I'm making a sort of gambling simulator.
ready:
TextWindow.WriteLine("Do you want to bet? yes(1) or no(2).")
answer = TextWindow.ReadNumber()
If answer = 1 Then
Goto start
Else
Goto ready
EndIf
start:
TextWindow.WriteLine("Ok lets go.")
points = 100
var1 = Math.GetRandomNumber(10)
If 5 < var1 < 9 Then
points = points + 100
ElseIf 9 < var1 < 10 then
points = points + 200
Elseif 1 < var1 < 5 then
points = points - 100
EndIf
TextWindow.WriteLine("You rolled " + var1 + ". You now have " + points + " points.")
The problem im facing is that whatever happens to my var1 100 gets added to my points, even when var1 is e.g. 1 or 10.
I've asked my teacher, he couldnt explain to me what was wrong. what am I to do?
thanks in advance