Page 1 of 1

[HELP] Have a software against theft?

Posted: Sat Jul 08, 2017 5:06 pm
by Aylin
Against code theft, Masters must publish a trainer code!
This is an applied code.
I want to integrate it into another trainer.

But: ')' expected near ';' (Error: ')>') .. I am getting the error.
I have to ask at every forum. Please help me. Thank you

Code: Select all

function bec(data)
    return ((data:gsub('.', function(x)
        local r,b='',x:byte()
        for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
        return r;
    end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
        if (#x < 6) then return '' end
        local c=0
        for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
        return b:sub(c+1,c+1)
    end)..({ '', '==', '=' })[#data%3+1])
end

function bdc(data)
    data = string.gsub(data, '[^'..b..'=]', '')
    return (data:gsub('.', function(x)
        if (x == '=') then return '' end
        local r,f='',(b:find(x)-1)
        for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end
        return r;
    end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
        if (#x ~= 8) then return '' end
        local c=0
        for i=1,8 do c=c+(x:sub(i,i)=='1' and 2^(8-i) or 0) end

       return string.char(c)
  end))
end

Re: [HELP] Have a software against theft?

Posted: Wed Dec 06, 2017 12:38 am
by jungletek
The error message is obvious, and literally tells you what is wrong: It's expecting a close parentheses ")" before it sees a semicolon ";", somewhere. If you're lucky, it'll even tell you what line the error occurs on.

You're probably missing a ')' somewhere and it's fucking up how the parser is interpreting your code. Use an editor that has proper syntax highlighting, especially one that highlights open and close parens/brackets/etc., should be easy to see where you're missing one...

Re: [HELP] Have a software against theft?

Posted: Tue Dec 12, 2017 4:29 am
by corroder
Just change > to >
and change &lt; to <
seem you jut did copy paste that script to your script editor such as notepad++

Re: [HELP] Have a software against theft?

Posted: Tue Dec 12, 2017 4:48 am
by jungletek
corroder wrote:
Tue Dec 12, 2017 4:29 am
Just change &gt; to >
and change &lt; to <
seem you jut did copy paste that script to your script editor such as notepad++
Ah, you're right. Sorry I didn't catch that, OP.