Posted 04 January 2013 - 10:36 AM
Hello guys, kelevra here again
I just finished a restart-resistant goto skript and apart from the fact that it leaves a little file with serialized data im pretty happy with it.
Everytime i try to delete it within/while the skript is running with fs.delete() it gives out the error message "Access denied". My question is now: how can i unload this file and delete it without leaving the skript?
The second problem i got is this little piece of code from my api:
I tried many variants of tostringing it or putting it in a variable first but nothing helped so far.
whats especially strange about this is that this part works:
I hope i dont spam the forum too much with my problems and i know im a little late but: HAPPY NEWYEAR! (and thanks :)/> )
I just finished a restart-resistant goto skript and apart from the fact that it leaves a little file with serialized data im pretty happy with it.
Everytime i try to delete it within/while the skript is running with fs.delete() it gives out the error message "Access denied". My question is now: how can i unload this file and delete it without leaving the skript?
The second problem i got is this little piece of code from my api:
statedata = loadData("state") loadData unserializes a table and returns it
if statedata["state"] == "running" then
print("FIX THIS ALREADY")
shell.run(statedata["program"]) Error: try to index a nil value
end
-----------------
{["state"]="running",["program"]="goto",} this is the serialized data
-----------------
I tried many variants of tostringing it or putting it in a variable first but nothing helped so far.
whats especially strange about this is that this part works:
if statedata["state"] == "error" then
print("OH NOEZ, SOMETHING CRASHED in the "..statedata["program"].." skript")
statedata = {state = "idle", program = "none"}
end
I hope i dont spam the forum too much with my problems and i know im a little late but: HAPPY NEWYEAR! (and thanks :)/> )