user24851336
user24851336

Reputation: 1

Script randomly stopped working, despite not changing it or updating g hub

I've tried restarting, and it used to work. Now it does nothing and am unsure what else to do, it just keeps saying the final like 'end' is a syntax error, and explains nothing else in the consosle if you know please help.

--------------------------------------
---------- Dont touch this -----------
EnablePrimaryMouseButtonEvents  (true);
function OnEvent(event,arg)
if EnableRCS ~= false then
if RequireToggle ~= false then
    if IsKeyLockOn(ToggleKey)then
        if IsMouseButtonPressed(3)then
            repeat
                if IsMouseButtonPressed(1) then
                    repeat
                        MoveMouseRelative(0,RecoilControlStrength)
                        Sleep(DelayRate)
                    until not IsMouseButtonPressed(1)
                end
            until not IsMouseButtonPressed(3)
        end
    end
    
else 

        if IsMouseButtonPressed(3)then
            repeat
                if IsMouseButtonPressed(1) then
                    repeat
                        MoveMouseRelative(0,RecoilControlStrength)
                        Sleep(DelayRate)
                    until not IsMouseButtonPressed(1)
                end
            until not IsMouseButtonPressed(3)
        end
    end
else 
end  
end

Upvotes: 0

Views: 176

Answers (1)

TheNomad
TheNomad

Reputation: 1713

else 
end 

The else is the problem. There is no other code before the end at the else. As advice, next time align the code properly and format it to see matching begin-of-statements with their end and you'll find the problems a lot faster. This is the easiest way.

Upvotes: 0

Related Questions