• Timer error?
    11 replies, posted
Hello, I'm recieving this error: https://i.gyazo.com/a6c0f65025d9c5a285494c548d6187aa.png At first I thought it was simply because I forgot to close the parentheses on the timer, but I fixed that and reloaded and it still pops up. Here's the snippet of code in question: (line 52 starts at the timer and line 55 is the second end) if !CANUSE then timer.Simple(600, function() CANUSE = true end end) end
if !CANUSE then timer.Simple(600, function() CANUSE = true end) end :v
if !CANUSE then timer.Simple(5, function() CANUSE = true end ) end You have too many ends, you need one end for the function (inside parentheses of the Simple timer) and one outside the parentheses of timer.Simple to end the if statement.
timer simple doesnt need a end tho cause its already a defined function?
Oh jeez I'm an idiot. Thank you all
Read my code and my post bruh.
you said it uses too manny ends. which was weird after all
Lol 3 is too many, 2 is the correct amount. What are you on about?
His original code (without edits) was if !CANUSE then timer.Simple(600, function() CANUSE = true end) end the ends. where is the third?
Here is an actual screenshot of his code, no offense just look harder. https://files.facepunch.com/forum/upload/227365/86b57623-c482-4ee5-9d0e-cec8e385cdaa/image.png
Aaaah. Missunderstandment. I thought you replyd to eziam1`s code. Which had 2 ends. Not the OP post with 3
Ah that is confusing, hence my confusion. No worries, cheers :P
Sorry, you need to Log In to post a reply to this thread.