Bug in my game I'm making

This game doesn’t display any results beside you find plenty of food and go home but the choice is supposed to random any help I can get

display dialog "Welcome to the Hidden World. Rules: You can only reroll once, Also Cancel equals quit game, Find some paper for scoring and every monster gets you 1 point and every Person with attack 1 gets you one point every person with 2 attack gets you 2 points ect. Have fun " buttons {"Play ( You can quit at any time)", "Cancel"}
repeat
	display dialog "Rolling for your attack"
	set Attack to (random number from 1 to 6) as text
	display dialog "Your Attack Roll is " & Attack
	display dialog "Would you Like to reroll?" buttons {"Yes I think I can do better", "No I'm fine with this Roll", "Cancel"}
	set Reroll_1 to the button returned of the result
	if Reroll_1 is "No I'm fine with this Roll" then exit repeat
	
end repeat
repeat
	display dialog "Rolling for your Defense"
	set Defense to (random number from 1 to 6) as text
	display dialog "Your Defense Roll is " & Defense
	display dialog "Would you Like to reroll?" buttons {"Yes I think I can do better", "No I'm fine with this Roll", "Cancel"}
	set Reroll_2 to the button returned of the result
	if Reroll_2 is "No I'm fine with this Roll" then exit repeat
end repeat
repeat
	display dialog "Rolling for your Health"
	set Health_Roll to (random number from 70 to 100) as text
	set Health to Health_Roll + Defense
	display dialog "Your Health is " & Health
	display dialog "Would you Like to reroll?" buttons {"Yes I think I can do better", "No I'm fine with this Roll"}
	set Reroll_3 to the button returned of the result
	if Reroll_3 is "No I'm fine with this Roll" then exit repeat
end repeat
set Attack_Stats to "Your Stats are Attack " & Attack
set Defense_Stats to ", Defense " & Defense
set Health_Stats to ", and Health " & Health
display dialog "" & Attack_Stats & Defense_Stats & Health_Stats
repeat
	display dialog "What do you want to do to do today?" buttons {"Go hunt in the forest", "Go battle someone in the arena", "Stay at home"}
	set What_Do_You_Want_To_Do to the button returned of the result
	if What_Do_You_Want_To_Do is "Go hunt in the forest" then
		set Forest_Roll to (random number from 1 to 6) as text
		if Forest_Roll is "1" then
			display dialog "You find pleanty of food and you go home and sleep "
			if Forest_Roll is "2" then
				display dialog "You hear a monster so you leave hastly"
			end if
		end if
	end if
end repeat

Hi,

the magic word is else :wink:


		if Forest_Roll is "1" then
			display dialog "You find pleanty of food and you go home and sleep "
		else if Forest_Roll is "2" then
			display dialog "You hear a monster so you leave hastly"
		end if

Thanks Stefan, It now chooses the out come randomly but you have to click the button several times before the page dose any thing any help? I incorporated what you said to do

Of course it does: the repeat loop responds only to numbers 1 and 2, the numbers from 3 to 6 are ignored and the loop repeats again. With this code you get at least a message for any number

		if Forest_Roll is "1" then
			display dialog "You find pleanty of food and you go home and sleep "
		else if Forest_Roll is "2" then
			display dialog "You hear a monster so you leave hastly"
		else
			display dialog "I'm sorry. Number " & Forest_Roll & " does nothing"
		end if

thanks :smiley: I should have known

Right now in the game I’m using

set Forest_Roll to (random number from 1 to 6) as text
if Forest_Roll is "1" then
display dialog "Game Dialog"

to pick the random dialog when you go to the forest I wonder is there an way to simplify it so it gose a head and picks a dialog to play without need for the random number from 1 to 6