Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

expected <eof> got end?

Asked by 8 years ago

I tried making a timer script...

if timertime == timerdefault then
    repeat timertime = timertime - 1
    text = timertime
    wait(1) 
    until
    timertime == 0 and text == 0
elseif mappicked == true then
    repeat timertime = timertime - 1
    text = timertime
    wait(1) 
    until
    timertime == 0 and text == 0
    end
end

and the last end says expected <eof>, got 'end' Help please?

2 answers

Log in to vote
2
Answered by 8 years ago

Your second repeat had an end on it

if timertime == timerdefault then
    repeat timertime = timertime - 1
    text = timertime
    wait(1) 
    until
    timertime == 0 and text == 0
elseif mappicked == true then
    repeat timertime = timertime - 1
    text = timertime
    wait(1) 
    until
    timertime == 0 and text == 0
end

0
Grrr you win this one, I was just about to post D:< Legojoker 345 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

You have an extra end on line 13. Until is the end for a repeat loop, you do not need another one.

if timertime == timerdefault then
    repeat timertime = timertime - 1
    text = timertime
    wait(1) 
    until
    timertime == 0 and text == 0
elseif mappicked == true then
    repeat timertime = timertime - 1
    text = timertime
    wait(1) 
    until
    timertime == 0 and text == 0
end


Answer this question