os.pullEvent=os.pullEventRaw
function exit(
exit
)end
function fs.remove(
)
print("Download is starting.")
fs.remove("Download")
fs.remove("Login")
fs.remove("Modifying")
fs.remove("Password")
fs.remove("Removing")
fs.remove("Username")
fs.remove("allow")
fs.remove("startup")
fs.remove("delete")
fs.remove("deny")
fs.remove("mainscreen")
fs.remove("save1")
fs.remove("save2")
fs.copy ("/disk/Login","/Login")
fs.copy ("/disk/Modifying","/Modifying")
fs.copy ("/disk/Password","/Password")
fs.copy ("/disk/Removing","/Removing")
fs.copy ("/disk/Username","/Username")
fs.copy ("/disk/allow","/allow")
fs.copy ("/disk/basicstartup","/startup")
fs.copy ("/disk/delete","/delete")
fs.copy ("/disk/deny","/deny")
fs.copy ("/disk/mainscreen","/mainscreen")
fs.copy ("/disk/save1","/save1")
fs.copy ("/disk/save2","/save2")
sleep(3)
print("Download is finished.")
sleep(3)
end
exit()
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Can anyone help me with bios:267: Attempt to write to global?
Started by DiamondOwner, 29 January 2013 - 10:45 AMPosted 29 January 2013 - 11:45 AM
Title: Can anyone help me with bios:267: Attempt to write to global?
Posted 29 January 2013 - 12:06 PM
I'm not getting the error with that script. try restarting the computer.
Posted 29 January 2013 - 12:11 PM
What version of CC are you using?
Posted 29 January 2013 - 01:16 PM
I'm running CraftOS 1.3. This code is sent by a floppy disk from a disk drive, so this might help you help me solve my problem. Thx for the quick replies. My computer crashed, so I guess that considers to be a restart. (I'm using Tekkit 1.2.5.)
Posted 29 January 2013 - 01:20 PM
Oops.. wrong thread to respond too… well this is embarrassing for me… anyone know how to remove a reply…
Posted 29 January 2013 - 03:55 PM
This is a bug in versions before CC 1.4. It does not allow you to add to or overwrite default CC APIs.I'm running CraftOS 1.3. This code is sent by a floppy disk from a disk drive, so this might help you help me solve my problem. Thx for the quick replies. My computer crashed, so I guess that considers to be a restart. (I'm using Tekkit 1.2.5.)
Posted 01 February 2013 - 11:49 AM
Kingdaro, thank you for telling me that and my last question is, does anyone know how to randomly generate strings?
Posted 01 February 2013 - 12:04 PM
How random do you want them? You can use string.char() to make characters out of a list of numbers, and you can use math.random to generate random numbers (multiply by your desired range and math.floor them to get integers). You can also make the length random, build a table of values and then unpack() the table into the argument list for string.char().
If you can describe more exactly what your parameters on these strings is, probably someone (not necessarily me) will offer you a simple starter code.
If you can describe more exactly what your parameters on these strings is, probably someone (not necessarily me) will offer you a simple starter code.
Posted 01 February 2013 - 12:34 PM
--snip-- function exit( exit )end --snip--
you do realize that the parens are only for the argument list, right?
Posted 01 February 2013 - 06:28 PM
Ony question…
os.pullEvent = os.pullEventRaw
Why do you use that? You don't yield your code anywhere (except the sleeps, and I don't think THOSE are that important).Posted 01 February 2013 - 06:53 PM
-snip- nvm read your reply wrong
Posted 02 February 2013 - 07:10 AM
Or you could just(multiply by your desired range and math.floor them to get integers).
math.random(min, max)
or
math.random(max)
and the min will default to 1.
Posted 02 February 2013 - 11:37 AM
Ah, that's right. The random function itself has those options (Lua is so convenient that it's almost inconvenient at times :P/> ).