Guys, I got a bug that I can't figure out. Please anyone can find a solution?
Error message: picturer:77: bad argument #1: value expected
Code: http://pastebin.com/4r4pPsTY
Thanks in advance!
7 replies to this topic
#1
Posted 07 September 2013 - 02:16 PM
#2
Posted 07 September 2013 - 03:58 PM
You might be converting your hex numbers into decimal numbers incorrectly. Try using tonumber (hexNumber, 16) to convert the hex string into base 10 from base 16.
#3
Posted 07 September 2013 - 04:14 PM
Grim Reaper, on 07 September 2013 - 03:58 PM, said:
You might be converting your hex numbers into decimal numbers incorrectly. Try using tonumber (hexNumber, 16) to convert the hex string into base 10 from base 16.
Error: bios:337: [string "picturer"]:56: ')' expected
Link: http://pastebin.com/7Z6LXupD
Note: I am trying to edit a picture
#4
Posted 07 September 2013 - 07:17 PM
this line wasnt using parentheses properly
term.setBackgroundColor(2^tonumber(string.sub(bg[pi], pj, pj), 16))
#6
Posted 08 September 2013 - 05:57 AM
if tonumber is returning nil then it means the string being passed to it is not valid hexadecimal. Make sure you're not giving it anything that wouldn't be valid hex.
#7
Posted 08 September 2013 - 06:04 AM
theoriginalbit, on 08 September 2013 - 05:57 AM, said:
if tonumber is returning nil then it means the string being passed to it is not valid hexadecimal. Make sure you're not giving it anything that wouldn't be valid hex.
#8
Posted 09 September 2013 - 06:46 AM
FIXED. I switched the height with width, so I had '19' instead of '51'. Thanks for contributing everyone!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











