Jump to content




Named timer function


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

#1 Exerro

  • Members
  • 801 posts

Posted 27 December 2012 - 12:42 AM

Ok ive been messing around with making a new function that has named timers but it keeps throwing an error :l
heres the code:
Spoiler

I really dont know whats wrong

#2 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 27 December 2012 - 01:30 AM

Can you please post the error too... Is it attempt to call nil?

#3 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 27 December 2012 - 01:49 AM

you are using the table "timers" when you have not defined it as a table. add
local timers={}
to the top of your code

#4 Exerro

  • Members
  • 801 posts

Posted 27 December 2012 - 02:17 AM

this isnt the whole code btw...im making a library thing like love2d and the table timers is defined at the top (forgot to add that into the code here)
all of the "clock" library is here:
Spoiler

the error is something like attempt to compare nil with number

#5 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 27 December 2012 - 02:19 AM

we need the full code to assist you...

#6 Exerro

  • Members
  • 801 posts

Posted 27 December 2012 - 02:28 AM

all code here...the timer stuff is in BlueSky/clock.lua test.lua is where it runs BlueSky.lua is the code that puts it all together

#7 ChunLing

  • Members
  • 2,027 posts

Posted 27 December 2012 - 04:11 PM

We also would prefer to have the line number of the error. The error message should specify which string (file) cause the error on what line. A tip, [Bios]:666 (or whatever) is the clever program that notices your mistakes, it is not the source of the mistake.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users