Jump to content




count down from x number help (SOLVED)

computer command utility

1 reply to this topic

#1 danielsv03

  • Members
  • 66 posts
  • LocationMinecraft world

Posted 15 April 2017 - 12:53 PM

Hello so i want to make it count down like something like this but it dosen't work




a = 4

repeat

b = a - 1

print( b )

until b == 1


But it will spam 3 how can i make it print "3" then 2 then 1


Update: Switch all the b to a and it works

Edited by danielsv03, 15 April 2017 - 01:37 PM.


#2 ReBraLaCC

  • Members
  • 100 posts
  • LocationSublime Text 2

Posted 15 April 2017 - 01:54 PM

or do it easier and do it like

for a = 4,1,-1 do
print(a)
end





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users