Posted 25 May 2013 - 02:06 PM
Title: bug [1.53][SSP]Edit program not working properly
I'm not sure if this is relevant, but I have been using the bit API a bit, trying my best at an amature encryption program, and when ever I run the the program and then try to edit it, the edit program crashes giving me this error message:
"edit:388: attempt to index ? (a function value)"
I don't know if this is my code running a weird way or not, but restarting the virtual computer fixes the problem and I am able to edit the code again.
This is the code that seems to be creating the problem:
globalkey = 6
function keys(keyint)
globalkey = globalkey+keyint
return globalkey
end
function encrypt(toEncrypt,enckey)
for i = 1,#toEncrypt do
print(tostring(bit.bxor(toEncrypt,keys(enckey))))
end
end
encrypt({72,101,108,108,111},2)
I'm not sure if this is relevant, but I have been using the bit API a bit, trying my best at an amature encryption program, and when ever I run the the program and then try to edit it, the edit program crashes giving me this error message:
"edit:388: attempt to index ? (a function value)"
I don't know if this is my code running a weird way or not, but restarting the virtual computer fixes the problem and I am able to edit the code again.
This is the code that seems to be creating the problem:
globalkey = 6
function keys(keyint)
globalkey = globalkey+keyint
return globalkey
end
function encrypt(toEncrypt,enckey)
for i = 1,#toEncrypt do
print(tostring(bit.bxor(toEncrypt,keys(enckey))))
end
end
encrypt({72,101,108,108,111},2)