Deimos161 Posted December 15, 2012 Posted December 15, 2012 Hey guys, I have world anchors banned for non OPs but I have some placed under some computers in my spawn to keep them running at all times. But they don't` seem to be working. IE the computers are turning off. Also I am having trouble with two of my monitor displays.(These displays, show my banned items on my server). Now the problem that I am having is that the text is disappearing of the screens until I break a monitor and replace it. my monitor is 5wide by 6 high. This is my code I am using local w,h = term.getSize() local function printCenter(line) local width = string.len(line) if width < w then local x,y = term.getCursorPos() term.setCursorPos(w/2 - width/2,y) end print(line) end printCenter 'Banned Items' printCenter '' print([[Abyss Helmet Anchor Cart Black Hole Band Blaze Rods Block Breaker Builder Cannon Catalytic Lens Collector MK1 Collector MK2 Collector MK3 DM pedestal DM Hammer Dest. Catalyst DragonEgg Dynamite EnderChest Evertide Amulet Filler Gravity Greaves HurricaneBoots HyperkineticLens Infernal Armor MFE Cart Mercurial Eye Mining Laser Nova Cataclysm Nova Catalyst Nuke Project Table RM Armour RM Furnace RM Katar RM MorningStar RM Tools Ranged Weapons Ring of Arcana Ring of Ignition SwiftWolf Ring Tank Cart Teleport Tether TnT TnT Cart Triangulator Transmutation Tablet Turtles Void Ring Volcanite Amulet Watch of flowing time World Anchor Zero Ring]]) printCenter '' printCenter '' printCenter 'Collectors, RM Tool, RM Armour and Swiftwolf' printCenter 'are Donator only' printCenter '' printCenter 'These items may change at anytime,' printCenter 'please check back often to see' printCenter 'if anything has changed' printCenter '' printCenter 'Banned items will turn to dirt' printCenter 'if you craft them.This is at your expense' printCenter 'and staff will not refund the items' Quote
Djinnii Posted December 15, 2012 Posted December 15, 2012 I'd just name the program you want to run all the time as "start" on either the local computer or a disk. Then whenever the chunk is loaded, that program will run. Quote
theprolo Posted December 15, 2012 Posted December 15, 2012 I'd just name the program you want to run all the time as "start" on either the local computer or a disk. Then whenever the chunk is loaded, that program will run. It's startup isn't it? Do both start and startup work now? Quote
Djinnii Posted December 15, 2012 Posted December 15, 2012 no, your probably right, it's probably "startup". Didn't sleep much last night :-) Quote
Deimos161 Posted December 15, 2012 Author Posted December 15, 2012 it is startup which I have done. The startup program is shell.run("monitor","top","rules") but if a chunk gets unloaded the computer has to be turned back on. The aim of these screens are to display my banned items and rules. Quote
Djinnii Posted December 15, 2012 Posted December 15, 2012 if the program is named startup it will load that program everytime the chunk is loaded. I had a similar setup with my own rules/banneditems not too long ago. Quote
Deimos161 Posted December 15, 2012 Author Posted December 15, 2012 well thats what I have. But computers do not automatically turn on when a chunk is loaded. You have to click the computer before it will turn on, then when the computer starts it runs what every program is in startup. My problem is chunk loaders are not working and my monitors seems to be all kinds of mucked up. Quote
Djinnii Posted December 15, 2012 Posted December 15, 2012 Your doing something wrong. Sorry. But you shouldn't need to use chunk loaders with computercraft. Quote
Deimos161 Posted December 15, 2012 Author Posted December 15, 2012 tell me what you do? The code I am using is above (this is saved on my server via FTP) I then click the computer type: edit startup type: shell.run("monitor","top","banned") control - save control - exit type: startup so it runs If I leave the chunk unloaded for a bit then return the computer has turned off. Quote
Djinnii Posted December 15, 2012 Posted December 15, 2012 I see.... I just put the program in "startup" rather than try and run another program from it. I'd also tend to test it using "reboot" to save having to unload the chunk etc... p.s. in your post I do believe your missing a ); Quote
Jelato Foot Posted December 15, 2012 Posted December 15, 2012 It seems like it's something like your computer is turning on but it's being loaded before the monitor is and so when it tries to connect to the monitor it can't because it doesn't see it as being there, possibly try adding a delay at the top of the script to give the monitors chance to load before attempting to write to them.. Quote
Deimos161 Posted December 16, 2012 Author Posted December 16, 2012 Hmm that is a good idea, thanks. Oh I dont know who to add a delay to it. is it just sleep(1) ? Quote
theprolo Posted December 16, 2012 Posted December 16, 2012 Hmm that is a good idea, thanks. Oh I dont know who to add a delay to it. is it just sleep(1) ? Yeah, that should work. Chances are there's not anything more than a second gap between the computer and monitor being loaded. Quote
pherce Posted December 16, 2012 Posted December 16, 2012 It's because your monitor and cpu are not in the same chunk. The entire thing must be in one chunk or you will have this problem. Turn on chunks with REI (or WorldEdit CUI with //chunk) and you can check to see if indeed that is your problem. Quote
Deimos161 Posted December 16, 2012 Author Posted December 16, 2012 If I am using shell.run("monitor","top","rule") that would mean my screen is on top of my computer, meaning that it is in the same chunk so that is not my problem. Quote
pherce Posted December 16, 2012 Posted December 16, 2012 If I am using shell.run("monitor","top","rule") that would mean my screen is on top of my computer, meaning that it is in the same chunk so that is not my problem. No, that would just mean that your cpu is on top of your monitor. That doesn't necessarily mean it is the same chunk (Minecraft's 16x16x256 chunk). I promise you that's your problem. Edit: the WHOLE structure needs to be in one chunk. All the monitors and CPU. Quote
Deimos161 Posted December 16, 2012 Author Posted December 16, 2012 but a chunk is 256 blocks deep, meaning if my computer is the middle of a chunk (which it is) and then my display set up is on top of that. That would mean my display and computer are in the same chunk.... Quote
pherce Posted December 16, 2012 Posted December 16, 2012 What are you viewing chunks with? We had the exact same problem in our spawn (which is permanently loaded with MultiVerse). Always had to open the cpu for 'startup' to work. Turns out the monitor was not completely in the chunk. Quote
Deimos161 Posted December 17, 2012 Author Posted December 17, 2012 I am looking on the REI map I have also used //chunk on the top left and the top right corners of the monitor and they are both in the same chunk. Quote
theprolo Posted December 17, 2012 Posted December 17, 2012 If the monitor is above the computer, then it is definitely in the same chunk(unless it extends over the chunk borders). Chunk loaders load the whole chunk, not just a portion of it. Quote
Deimos161 Posted December 19, 2012 Author Posted December 19, 2012 So I fixed it by deleting the top level of monitors >.< dunno why that fixed it but they are now staying on Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.