@Hyper_Iguana-legacy (Hyper Iguana) posted a new topic, subject "Longjump". It read:

   I've taken my second attempt at making a longjump script.
    
    Longjump - Strafing left and right mid-jump repetitively  
    That means that you would need to rotate {+moveright, +right} with {+moveleft, +left}
    
    The problem I am having is timing, so I've tried timing this with a think hook.  
    In theory, I would like to have +left and +moveleft in a function that's run off on a think hook.  
    Within this function, I would attempt to run a separate function which negates the first functions actions,  
    and runs the new ones.
    
    The problem I run into is the function will not run.
    
    [lua]local function LongJamp()  
    RunConsoleCommand("-left")  
    RunConsoleCommand("-moveleft")  
    RunConsoleCommand("+right")  
    RunConsoleCommand("+moveright")  
    end
    
    local function LongJump()  
    RunConsoleCommand("-right")  
    RunConsoleCommand("-moveright")  
    RunConsoleCommand("+left")  
    RunConsoleCommand("+moveleft")  
    LongJamp  
    end --This is line 14
    
    local function Enable()  
    hook.Add(“Think”,“LongJump”, LongJump)  
    end  
    concommand.Add("+longjump", Enable)
    
    local function Disable()  
    hook.Remove(“Think”,“LongJump”)  
    end  
    concommand.Add("-longjump", Disable)  
    [/lua]
    
    My error is
    [code] 
        
        [RunString:14] '=' expected near 'end'
        
        
        
    [/code]
    
    I am doing this in luapad. This is all clientsided.

Then @Persious-legacy (Persious) said

    [lua]  
    local function LongJamp()  
    RunConsoleCommand("-left")  
    RunConsoleCommand("-moveleft")  
    RunConsoleCommand("+right")  
    RunConsoleCommand("+moveright")  
    end
    
    local function LongJump()  
    RunConsoleCommand("-right")  
    RunConsoleCommand("-moveright")  
    RunConsoleCommand("+left")  
    RunConsoleCommand("+moveleft")  
    LongJamp() – I just think you need those two ()  
    end --This is line 14
    
    local function Enable()  
    hook.Add(“Think”,“LongJump”, LongJump)  
    end  
    concommand.Add("+longjump", Enable)
    
    local function Disable()  
    hook.Remove(“Think”,“LongJump”)  
    end  
    concommand.Add("-longjump", Disable)
    
    [/lua]


{'source': 'discourse', 'url': 'https://forum.facepunch.com/t/longjump/97480', 'title': 'Longjump', 'views': 381, 'has_accepted_answer': False, 'word_count': 240, 'like_count': 0, 'reply_count': 1, 'participant_count': 2, 'posts': 2, 'tags': '', 'author': '@Hyper_Iguana-legacy (Hyper Iguana)', 'participants': '@Hyper_Iguana-legacy (Hyper Iguana), @Persious-legacy (Persious)', 'image_url': [None], 'created_at': '2011-11-23T02:21:31.000Z', 'last_posted_at': '2011-11-23T03:01:12.000Z'}