pasilein007, on 21 March 2014 - 08:06 PM, said:
"pastebin:101: attempt index ? (a nil value)"
edit pastebinto see if you have a modified version of pastebin, If it does then goto that line and post it.
Or you can just delete that version
Posted 21 March 2014 - 09:30 PM
pasilein007, on 21 March 2014 - 08:06 PM, said:
edit pastebinto see if you have a modified version of pastebin, If it does then goto that line and post it.
Posted 23 March 2014 - 06:42 PM
Edited by awsmazinggenius, 23 March 2014 - 06:43 PM.
Posted 24 March 2014 - 02:34 PM
Posted 24 March 2014 - 08:49 PM
Chickenbreadlp, on 24 March 2014 - 02:34 PM, said:
Posted 24 March 2014 - 11:59 PM
Edited by awsmazinggenius, 24 March 2014 - 11:59 PM.
Posted 25 March 2014 - 12:18 AM
awsmazinggenius, on 24 March 2014 - 11:59 PM, said:
Posted 12 June 2014 - 12:08 PM
Posted 12 June 2014 - 10:38 PM
TableCraft0R, on 12 June 2014 - 12:08 PM, said:
function ReadSKCH(path)
local _fs = fs
if OneOS then
_fs = OneOS.FS
end
local file = _fs.open(path, 'r')
local _layers = textutils.unserialize(file.readAll())
file.close()
local layers = {}
for i, l in ipairs(_layers) do
local layer = {
Name = l.Name,
Pixels = ParseNFT(l.Pixels),
BackgroundColour = l.BackgroundColour,
Visible = l.Visible,
Index = l.Index,
}
table.insert(layers, layer)
end
return layers
end
function ParseNFT(lines)
local pixels = {}
for y, line in ipairs(lines) do
local bgNext, fgNext = false, false
local currBG, currFG = nil,nil
local writePosition = 1
for x = 1, #line do
if not pixels[writePosition] then
pixels[writePosition] = {}
end
local nextChar = string.sub(line, x, x)
if nextChar:byte() == 30 then
bgNext = true
elseif nextChar:byte() == 31 then
fgNext = true
elseif bgNext then
currBG = getColourOf(nextChar)
if currBG == nil then
currBG = colours.transparent
end
bgNext = false
elseif fgNext then
currFG = getColourOf(nextChar)
fgNext = false
else
if nextChar ~= " " and currFG == nil then
currFG = colours.white
end
pixels[writePosition][y] = {BackgroundColour = currBG, TextColour = currFG, Character = nextChar}
writePosition = writePosition + 1
end
end
end
return pixels
end
Posted 14 June 2014 - 10:18 PM
Posted 02 August 2014 - 08:30 PM
Posted 28 October 2014 - 09:46 AM
Posted 27 November 2014 - 08:17 AM
Posted 13 December 2014 - 11:28 AM
Posted 15 December 2014 - 07:34 AM
Edited by oeed, 15 December 2014 - 07:52 AM.
0 members, 1 guests, 0 anonymous users