Jump to content




[Lua] [Error] For limit must be a number?


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

#1 MCuniverse

  • Members
  • 16 posts

Posted 22 April 2013 - 01:25 AM

Title: [Lua] [Error] For limit must be a number?
I've been having problems with my Prime Number program. The code is in http://pastebin.com/75kYHgMQ
Whenever it finishes the inputs, an error pops up: "prime:23: "for" limit must be a number." What will I do?

#2 mibac138

  • Members
  • 132 posts
  • LocationPoland

Posted 22 April 2013 - 07:59 AM

http://pastebin.com/ME4j1ix0

H
ere you are :)

Edited by mibac138, 05 February 2014 - 07:39 AM.


#3 SadKingBilly

  • Members
  • 160 posts

Posted 22 April 2013 - 08:54 AM

Line 23 calls for the value of variable "Num", which does not exist. Lua is case-sensitive: "Num" and "num" are two different things.

#4 MCuniverse

  • Members
  • 16 posts

Posted 22 April 2013 - 04:52 PM

View PostSadKingBilly, on 22 April 2013 - 08:54 AM, said:

Line 23 calls for the value of variable "Num", which does not exist. Lua is case-sensitive: "Num" and "num" are two different things.
Somehow with my own version even changing it to num, it still does not work... although combined with mibac138's version, it works now. Thanks!

#5 mibac138

  • Members
  • 132 posts
  • LocationPoland

Posted 23 April 2013 - 01:24 AM

:)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users