Jump to content




For loop help


  • You cannot reply to this topic
2 replies to this topic

#1 NoirVinoCacao

  • New Members
  • 3 posts

Posted 26 October 2012 - 03:33 PM

i want to create a for loop that loops a userdifined amount of times and I am having trouble with it.

what i have so far is(im only going to post the relevant part of the code btw)

Spoiler

srry i know it seems basic but when i input 10 it only pulses twice instead of 10 times

#2 Ditto8353

  • New Members
  • 138 posts

Posted 26 October 2012 - 03:35 PM

Remove the # in front of ntimes
# means 'length' or if used on a table 'number of items'

Edit: Actually you will need to replace #ntimes with tonumber(ntimes)
read() gives strings, you need to convert it to a number

#3 NoirVinoCacao

  • New Members
  • 3 posts

Posted 26 October 2012 - 03:37 PM

woops lol
tyvm for the very quick response





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users