• Create Account

### #ActualO-san

Posted 18 June 2012 - 03:14 AM

Oops, now I see the omitted =, that makes it a chunk.. doh! The little things!

I must be missing something, that does not compute for me. My code looks like...

savefile.txt:

newObject=
{
id = 1,
}
newObject=
{
id = 2,
}

My script got these few lines:

newObject= function(input)
print("New object")
for k,v in pairs(input) do
print("== "..tostring(k).."="..tostring(v))
end
end

dofile("savefile.txt")

As soon as I dofile("savefile.txt") my newObject function type becomes a table type and I am missing why it should not. Thanks for taking your time!

### #1O-san

Posted 18 June 2012 - 02:23 AM

I must be missing something, that does not compute for me. My code looks like...

savefile.txt:

newObject=
{
id = 1,
}
newObject=
{
id = 2,
}

My script got these few lines:

newObject= function(input)
print("New object")
for k,v in pairs(input) do
print("== "..tostring(k).."="..tostring(v))
end
end

dofile("savefile.txt")

As soon as I dofile("savefile.txt") my newObject function type becomes a table type and I am missing why it should not. Thanks for taking your time!

PARTNERS