Posted 12 September 2016 - 02:21 PM
I started this script below in which I wanted to alter file content. When I put in my first check if the file exists, it threw out of the blue the "a attempt to call nill" error. I am clueless what the problem seems to be.
I modified the script to gather more information and look it prints the exists function, but later when I try to access it directly it is nill again?
I rebooted the CC computer in the hope it is a corrupted table, but with no success. (Also tried restarting minecraft)
(Vanilla CraftOS 1.7)
The script….
I hope you guys can spot any issues?
I modified the script to gather more information and look it prints the exists function, but later when I try to access it directly it is nill again?
I rebooted the CC computer in the hope it is a corrupted table, but with no success. (Also tried restarting minecraft)
(Vanilla CraftOS 1.7)
The script….
arguments = {...}
print(#arguments)
blrup = {}
references = {}
if arguments ~= nil and #arguments > 0 then
for k,v in pairs(fs) do
print(" ",k, "-", v)
fs[k]=v
blrup[k] = v
if references[v] then
error("reference found twice" , k)
end
references[v] = true
end
if( arguments[1] and string.lower(arguments[1]) == "register" and arguments[2] and fs["exsists"](arguments[2])) then
print("Service registered - %s", arguments[2])
elseif arguments[1] and string.lower(arguments[1]) == "register" then
printError("Please use Service register [PATH]")
print("Is fs nil? ", fs == nil)
print("Is fs.exsists nil? ", fs.exsists == nil and fs["exsists"] == nil and blrup["exsists"] == nil)
print(fs.exsists("/test"))
end
end
I hope you guys can spot any issues?
Edited on 12 September 2016 - 02:12 PM