Wei Posted September 14, 2014 Share Posted September 14, 2014 how to use while in scripts ? Link to comment
darhal Posted September 14, 2014 Share Posted September 14, 2014 (edited) While is a type of loops here an eg num = 0 function () while num <= 5 do num = num + 1 end end -- while still working until num be 5 so it will repeat the num = num+1 unitil num reach 6 for more info see tutorials section I recommend xxMadexx tutorial Edited September 14, 2014 by Guest Link to comment
Moderators IIYAMA Posted September 14, 2014 Moderators Share Posted September 14, 2014 ------------------------------------------------- local outputChatBox = outputChatBox or print ------------------------------------------------- local count = 1 while count <= 10 do outputChatBox(count) count = count+1 end http://www.lua.org/cgi-bin/demo Link to comment
Wei Posted September 14, 2014 Author Share Posted September 14, 2014 Thank you both for explanation Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now