5 posts
Posted 29 July 2012 - 08:07 PM
I'm getting a completely random error with my monitor setup.
I have a 3x2 monitor setup at my spawn which is supposed to display a welcome message, as well as some rules.
The issue is, the computer randomly throws an "Invalid Monitor Setup" error, but not all the time. It's completely random. Sometimes it will work correctly, other times it wont. There doesn't seem to be any reason behind it.
The error:
What it looks like when I get the error:
What it looks like when it actually works:
992 posts
Posted 29 July 2012 - 08:15 PM
If you put up your code I can check if there is an error in it Other than that i cant do much with just pics.
5 posts
Posted 29 July 2012 - 08:23 PM
If you put up your code I can check if there is an error in it Other than that i cant do much with just pics.
There isn't an issue with the code. Like I said, it works the majority of the time, but it randomly doesn't work sometimes.
992 posts
Posted 29 July 2012 - 08:24 PM
If you put up your code I can check if there is an error in it Other than that i cant do much with just pics.
There isn't an issue with the code. Like I said, it works the majority of the time, but it randomly doesn't work sometimes.
I haven't had this happen to me. I cant test your code and the pictures don't help much so with that said
good night
5 posts
Posted 29 July 2012 - 08:29 PM
If you put up your code I can check if there is an error in it Other than that i cant do much with just pics.
There isn't an issue with the code. Like I said, it works the majority of the time, but it randomly doesn't work sometimes.
I haven't had this happen to me. I cant test your code and the pictures don't help much so with that said
good night
local tText = {
"",
"Welcome to BukkitHost.com's Tekkit Server!",
"",
"Please read and follow the rules below:",
"",
"No Griefing",
"Respect All Players",
"Don't Ask for Staff",
"No Advertising"
}
local sSide = "top"
local nTextSize = 1
local function printCenter(mon, t)
local w, h = mon.getSize()
local y = math.floor((h / 2) - (#t / 2)) - 1
for i, line in ipairs(t) do
local x = math.floor((w / 2) - (#line / 2))
mon.setCursorPos(x, y + i)
mon.write(line)
end
end
local mon = peripheral.wrap(sSide)
mon.setTextScale(nTextSize)
printCenter(mon, tText)
If you truly think there's something wrong with the code…. there you go.
992 posts
Posted 29 July 2012 - 09:05 PM
So this is in a startup file ?
I think maybe the problem is when you leave the monitor and it is unloaded from the world then reloaded causing the picture on the monitor to be wiped.
solution add a loop to redraw the screen every x time example 120 seconds.
here
Spoiler
local tText = {
"",
"Welcome to BukkitHost.com's Tekkit Server!",
"",
"Please read and follow the rules below:",
"",
"No Griefing",
"Respect All Players",
"Don't Ask for Staff",
"No Advertising"
}
local sSide = "top"
local nTextSize = 1
local function printCenter(mon, t)
local w, h = mon.getSize()
local y = math.floor((h / 2) - (#t / 2)) - 1
for i, line in ipairs(t) do
local x = math.floor((w / 2) - (#line / 2))
mon.setCursorPos(x, y + i)
mon.write(line)
end
end
local mon = peripheral.wrap(sSide)
mon.setTextScale(nTextSize)
while true do
mon.clear()
mon.setCursorPos(1,1)
printCenter(mon, tText)
sleep(120)
end
5 posts
Posted 29 July 2012 - 09:29 PM
I'm sure it's not an issue with the script. The issue with the solution you posted is that with the invalid monitor error, the script doesn't even get a chance to run, so refreshing the text wouldn't do any good.
I've tried a couple other scripts, and they all do the same thing.
992 posts
Posted 29 July 2012 - 09:32 PM
I'm sure it's not an issue with the script. The issue with the solution you posted is that with the invalid monitor error, the script doesn't even get a chance to run, so refreshing the text wouldn't do any good.
I've tried a couple other scripts, and they all do the same thing.
try my program for a while and name it "startup" and if your problem comes back you can say I told you so. Prove me wrong I dare you.
5 posts
Posted 29 July 2012 - 09:36 PM
I'm sure it's not an issue with the script. The issue with the solution you posted is that with the invalid monitor error, the script doesn't even get a chance to run, so refreshing the text wouldn't do any good.
I've tried a couple other scripts, and they all do the same thing.
try my program for a while and name it "startup" and if your problem comes back you can say I told you so. Prove me wrong I dare you.
I did try it. Same issue. :/
992 posts
Posted 29 July 2012 - 09:46 PM
OK I concede I have no clue what is going on here.
3790 posts
Location
Lincoln, Nebraska
Posted 29 July 2012 - 09:50 PM
You broke it…
286 posts
Location
Bonn Germany
Posted 29 July 2012 - 09:59 PM
Ok this is an issue that never should happen. It's build into CC for safety reasons I guess. The Monitor will throw this Exception if it's unable to detect it's origin and/or it's terminal. That's all I know.
Try replacing your Monitors or rearrange them. Try attaching the Computer to a different Block or from another side. But as this error occurs randomly from time to time. The problem has a deeper reason. You can reinstall CC or update it.
If all this is not soling the problem you'll have to wait for support from dan/Cloudy or a real genius.
8543 posts
Posted 29 July 2012 - 10:36 PM
Check to see where nearby chunk boundaries are.
29 posts
Location
Colorado, USA
Posted 24 September 2012 - 09:08 AM
I've been having this problem too. Sure enough, the monitor and the computer are on opposite sides of a chunk boundary. Of course, moving either permanently is a major architectural overhaul. FML
992 posts
Posted 24 September 2012 - 10:52 AM
I've been having this problem too. Sure enough, the monitor and the computer are on opposite sides of a chunk boundary. Of course, moving either permanently is a major architectural overhaul. FML
you might conceder a chunk loader block? hide it somewhere near and the problem should go away as the chunks will always be active.