This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
iconmaster's profile picture

[ERROR] bios:267: attempt to write to global

Started by iconmaster, 12 December 2012 - 11:59 PM
iconmaster #1
Posted 13 December 2012 - 12:59 AM
Got this code here:


moni = peripheral.wrap("top")
txt = {[[This is a dedicated Tekkit server.
Current Tekkit version: 2.1.2
Welcome to this small server, owned by iconmaster5326.
Have fun!]],[[RULES:
Don't grief or steal.
PVP is only allowed if either both parties consent, or one of them are breaking rules.
Don't be rude, please.
Have fun!]],[[If you need something, don't be afrad to contact our moderators! They are:
iconmaster5326
the1nonly12
jovisc]],[[This server has Bukkit Essentials installed!
You can set your home with /sethome, and recall yourelf with /home and /back.]],[[This server has WorldGuard installed!
You can request your area to be protected by a moderator.
Do so, and never be griefed again!]],[[Got other problems? You can contact the administrator at:
crazybonesj@yahoo.com]]}
while true do
  for ii=1,#txt do
    moni.write("Welcome To Iconmaster's Server!")
    moni.write("")
    moni.write(txt[ii])
    sleep(10000)
    moni.clear()
  end
end

And I have this titular error upon execution. I am using Tekkit.
KaoS #2
Posted 13 December 2012 - 02:33 AM
make your variables local


local moni = peripheral.wrap("top")
local txt = {[[This is a dedicated Tekkit server.
Current Tekkit version: 2.1.2
Welcome to this small server, owned by iconmaster5326.
Have fun!]],[[RULES:
Don't grief or steal.
PVP is only allowed if either both parties consent, or one of them are breaking rules.
Don't be rude, please.
Have fun!]],[[If you need something, don't be afrad to contact our moderators! They are:
iconmaster5326
the1nonly12
jovisc]],[[This server has Bukkit Essentials installed!
You can set your home with /sethome, and recall yourelf with /home and /back.]],[[This server has WorldGuard installed!
You can request your area to be protected by a moderator.
Do so, and never be griefed again!]],[[Got other problems? You can contact the administrator at:
crazybonesj@yahoo.com]]}
while true do
  for i=1,#txt do
    moni.write("Welcome To Iconmaster's Server!")
    moni.write("")
    moni.write(txt[i])
    sleep(10000)
    moni.clear()
    moni.setCursorPos(1,1)
  end
end
iconmaster #3
Posted 13 December 2012 - 09:35 AM
It works. Thanks!
KaoS #4
Posted 13 December 2012 - 09:48 AM
no problem :)/>