Bradster Posted September 12, 2012 Share Posted September 12, 2012 Hi, for some reason none of our computer programs are working on the server. All we get is weird numbers when trying to run something with no error. See the picture. I haven't changed anything in the configs, all we did was a server restart the previous night and this started happening. Any ideas? Link to comment Share on other sites More sharing options...
RebelNode Posted September 12, 2012 Share Posted September 12, 2012 Re-install computercraft? It has a ton of files server side you know (mods/computercraft and worldname/computercraftdata). Some of those might be corrupted. Link to comment Share on other sites More sharing options...
Viktor_Berg Posted September 12, 2012 Share Posted September 12, 2012 None of those commands seem to be valid. Strings need to be enclosed by quotes on both sides. Sleep seems to have worked fine, seeing as you terminated it manually. As for the http.get function, I couldn't get it to work at all on my computercraft as well - I get "the attempt to index ? (a nil value)" error. Link to comment Share on other sites More sharing options...
TheBard Posted September 12, 2012 Share Posted September 12, 2012 Is this a private or public server? Someone could have uploaded a ComputerCraft virus. Seriously, they exist. They can overwrite your base ComputerCraft startup scrips etc and make your computers do/run all kinds of crazy things. Check out the computercraft files in your world save folder and see if any of the code looks wrong. Or just flat out delete the computercraft files in your world save folder, and reinstall the computercraft mod. Always make a backup just in case first! Edit: Also, do some google searches for ComputerCraft anti-virus. Link to comment Share on other sites More sharing options...
gavjenks Posted September 12, 2012 Share Posted September 12, 2012 This is not a bug. Computercraft is working exactly as it is supposed to. What is happening is that you aren't typing ANY of your commands correctly, and so every time, it fails, and then it prints out a number. That number is an error code, which tells you roughly what it is that you did incorrectly. I have never found an actual list of the error codes, but looking at your above screenshot, I would guess that: 1 = null pointer exception (the variable "a" doesn't exist, so cant be printed. If you want to print the letter a, you must do print("a")) 30 = Syntax error for including weird, single quotes only on one side... 37 = Not sure about this one. Maybe something like Non-existent function? (http has to be enabled in your server's config file, did you do that? Also even then, its tricky to use. The pastebin command is much better, just use that.) Basically, you don't seem to have any idea what you're doing in lua. Not insulting you, just stating the obvious. Thus, I suggest you look up some starter tutorials for computercraft, which should be available online. Or visit the computercraft wiki, and search for the functions you wish to use. The pages on the wiki should tell you the correct syntax (for example, using double quotes " on both sides, etc.), and will give examples. Link to comment Share on other sites More sharing options...
nAyo Posted September 12, 2012 Share Posted September 12, 2012 Check this out guys : http://www.computercraft.info/forums2/index.php?/topic/4091-error-programs-not-running-returning-random-numbers/ All those commands were to test, we know we need 2 apostrophes etc.. obviously! Anyway read the previous link it may be more explicit. But just so you know, I made the working (until today) tictactoe game which is giving me those errors so I guess I know a bit what I'm doing in lua, and bradster is like a developer so, lol. Link to comment Share on other sites More sharing options...
Bradster Posted September 12, 2012 Author Share Posted September 12, 2012 None of those commands seem to be valid. Strings need to be enclosed by quotes on both sides. Sleep seems to have worked fine, seeing as you terminated it manually. As for the http.get function, I couldn't get it to work at all on my computercraft as well - I get "the attempt to index ? (a nil value)" error. Those commands are valid, the invalid ones were used to test the functionality of ComputerCraft to see if errors were being reported matched each time and it wasn't just giving me random errors for the same syntax erros. Basically, you don't seem to have any idea what you're doing in lua. Not insulting you, just stating the obvious. Thus, I suggest you look up some starter tutorials for computercraft, which should be available online. Or visit the computercraft wiki, and search for the functions you wish to use. The pages on the wiki should tell you the correct syntax (for example, using double quotes " on both sides, etc.), and will give examples. Basically, I do know what I'm doing. I've been programming for years. Read my reply to the other guy who stated my commands were wrong. In repsonse to your previous paragraph however. HTTP is enabled, we was using Pastebin beforehand to auto-update our startup programs. I did think they were error codes so looked them up but couldn't find any relation between LUA and the numbers. It should say something like bios:(expected = after for loop):6. 6 being the line number of the error. Instead it just shows me an error stop code with no reference to the line or syntax error. Is this a private or public server? Someone could have uploaded a ComputerCraft virus. Seriously, they exist. They can overwrite your base ComputerCraft startup scrips etc and make your computers do/run all kinds of crazy things. Check out the computercraft files in your world save folder and see if any of the code looks wrong. Or just flat out delete the computercraft files in your world save folder, and reinstall the computercraft mod. Always make a backup just in case first! Edit: Also, do some google searches for ComputerCraft anti-virus. I'll have a look into this. Thanks for the support. I'm going to try re-installing CC and see if that helps. If it doesn't well then I'll look forward to reading other replies. Link to comment Share on other sites More sharing options...
Viktor_Berg Posted September 12, 2012 Share Posted September 12, 2012 It seems like the parameter in your "http.get" functions is the name of a Pastebin link. And that's the problem: the pastebin command did everything for you if you just provided it with a proper pastebin link. However, http.get requires you to type in the FULL address of the pastebin link. Try http.get("pastebin.com/6FhgmTNJ"). Link to comment Share on other sites More sharing options...
gavjenks Posted September 12, 2012 Share Posted September 12, 2012 I did think they were error codes so looked them up but couldn't find any relation between LUA and the numbers. It should say something like bios:(expected = after for loop):6. 6 being the line number of the error. Instead it just shows me an error stop code with no reference to the line or syntax error. Yes, it should, and in fact it DOES create proper error reports like this, in the next update ComputerCraft 1.4, which is not currently in tekkit. It also has other goodies, like being able to hit "delete" as well as backspace, and the "end" and "home" keys work properly in CC 1.4. I think you may even be able to paste text. Hopefully this update (or another one compatible with 1.3) will be included in the next release of tekkit. Those commands are valid, the invalid ones were used to test the functionality of ComputerCraft to see if errors were being reported matched each time and it wasn't just giving me random errors for the same syntax erros. You know, it might be helpful to SAY that in the opening post... We'd like to spend our time helping people with their actual problems. When you simply make a thread with a bunch of commands that are all written incorrectly and then only write "Oh noes, I got errors," and don't explain anything else, then what on Earth do you expect people to say other than "You wrote them wrong."???? Also, I still have no way of knowing that the commands you typed earlier WERE, in fact, valid. I've been "programming for years," too, and got plenty of syntax errors when I started lua. It's different than java or other similar things in subtle ways, and we can't rule out that that's still the problem, unless you post examples of the types of commands you tried that were NOT intentionally flawed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now