tacgnol Posted February 28, 2015 Share Posted February 28, 2015 Hello everyone! Is there a way to broadcast a message to everyone with the dedicated server ? i plan to restart the server at midnight, and i want 5 minutes before the server restart, to broadcast a warning. i'm running ubuntu. Link to comment Share on other sites More sharing options...
Asparagus Posted February 28, 2015 Share Posted February 28, 2015 ...press "Y" for global chat......press "U" for whisper... O___O Link to comment Share on other sites More sharing options...
Michi01 Posted February 28, 2015 Share Posted February 28, 2015 If you're an admin, you can also open the console(with ~ on english keyboards, here is a list for that)and type in c_announce"whatever" . Just replace whatever with something you wanna write, and it will be shown to everyone like a death message. Link to comment Share on other sites More sharing options...
Nofew Posted February 28, 2015 Share Posted February 28, 2015 I'm interested in this too, but I'm pretty sure that both of us want to know how to do that without connecting to the server and instead use the shell that's running the server its self. Link to comment Share on other sites More sharing options...
Jjmarco Posted February 28, 2015 Share Posted February 28, 2015 @Nofew, If you add '-console' to the launch options of the server, you can input commands in the shell, and so you can use c_announce().There's also c_announce("message", [time in seconds]) for sending periodic messages. Link to comment Share on other sites More sharing options...
Nofew Posted February 28, 2015 Share Posted February 28, 2015 ... I will be doing this from now on forever. Thank you. o_o. Why isn't this the default? Seriously. It should be the default. o_o. Link to comment Share on other sites More sharing options...
Pyromailmann Posted February 28, 2015 Share Posted February 28, 2015 ... I will be doing this from now on forever. Thank you. o_o.Why isn't this the default? Seriously. It should be the default. o_o.because there is no actual server commands you can preform.You can only preform the emotes. Link to comment Share on other sites More sharing options...
rezecib Posted March 1, 2015 Share Posted March 1, 2015 because there is no actual server commands you can preform. You can only preform the emotes. ... what?? Link to comment Share on other sites More sharing options...
Pyromailmann Posted March 1, 2015 Share Posted March 1, 2015 ... what??I meant in the chat. Link to comment Share on other sites More sharing options...
rezecib Posted March 1, 2015 Share Posted March 1, 2015 @Pyromailmann, But... okay, the scenario he was talking about is this: when you run the dedicated server program, it brings up a console window (aka a shell), which prints out stuff like the in-game log. Using -console in the launch options for the dedicated server allows you to type console commands into that shell. Nofew was asking why -console wasn't on by default. Link to comment Share on other sites More sharing options...
DarkXero Posted March 1, 2015 Share Posted March 1, 2015 rezecib, and you can even make a mod with custom commands through chat. Link to comment Share on other sites More sharing options...
tacgnol Posted March 1, 2015 Author Share Posted March 1, 2015 ...press "Y" for global chat......press "U" for whisper... O___O I want to broadcast the mesage while i'm not on the server itself or in the screen session... just a warning that the server will restart. I am looking at something that will connect to the screen session in the background, then broadcast the message, then detatch the screen session. Link to comment Share on other sites More sharing options...
Nofew Posted March 1, 2015 Share Posted March 1, 2015 Blargle-blah. c_announce doesn't work. It just says "attempt to call a nil value" a few times. I'm entering: c_announce("Testing, testing...") -- What am I doing wrong? c_announce("testing, testing..." 0) returns the same thing, as does inserting a comma in the appropriate spot. x.x Link to comment Share on other sites More sharing options...
rezecib Posted March 1, 2015 Share Posted March 1, 2015 @Nofew, That's weird... are you sure you're not leaving something out? For example, it can say that if you forget the trailing parenthesis. I guess show us the log after you try to use it? It's defined in scripts/consolecommands.lua, which should definitely be loading... Link to comment Share on other sites More sharing options...
Nofew Posted March 1, 2015 Share Posted March 1, 2015 I've got a vague notion that it might /need/ another parameter even if it never uses it. I think I've seen this error before for that reason, but can't remember where or how I got past it.. c_announce("Testing announcementstuffs, don't panic!") [03:33:29]: ConsoleInput: "c_announce("Testing" [03:33:29]: attempt to call a nil value [03:33:29]: ConsoleInput: "announcementstuffs," [03:33:29]: attempt to call a nil value [03:33:29]: ConsoleInput: "don't" [03:33:29]: attempt to call a nil value [03:33:29]: ConsoleInput: "panic!")" [03:33:29]: attempt to call a nil value Link to comment Share on other sites More sharing options...
rezecib Posted March 1, 2015 Share Posted March 1, 2015 @Nofew, Something really weird is happening to the quotes there, as you can see it's splitting up the command into 4 separate commands, as if you had done something like this:c_announce("1") c_announce("2") c_announce("3"), c_announce("4")... as for why that's happening, maybe it's a Linux shell thing? (derp just read the top post without looking at names) The command would definitely have worked if you had typed it in-game that way. I guess... try escaping the quotes? So:c_announce(\"Testing announcementstuffs, don\'t panic!\")Edit: might need to escape the single quote too, so I added it there Link to comment Share on other sites More sharing options...
Nofew Posted March 1, 2015 Share Posted March 1, 2015 I'm running Windows. I thought of escaping them too, but the way it was working suggests that the quotes aren't at fault. Regardless, I tried it (with a string that doesn't contain a singular quote) and got this: c_announce(\"Let me see if this works now...\") [03:52:58]: ConsoleInput: "c_announce(\"Let" [03:52:58]: attempt to call a nil value [03:52:58]: ConsoleInput: "me" [03:52:58]: attempt to call a nil value [03:52:58]: ConsoleInput: "see" [03:52:58]: attempt to call a nil value [03:52:58]: ConsoleInput: "if" [03:52:58]: attempt to call a nil value [03:52:58]: ConsoleInput: "this" [03:52:58]: attempt to call a nil value [03:52:58]: ConsoleInput: "works" [03:52:58]: attempt to call a nil value [03:52:58]: ConsoleInput: "now...\")" [03:52:58]: attempt to call a nil value EDIT: The command: c_announce("Debugging...") works just fine! Maybe the thingy just hates spaces.. c_announce("Debugging...") [04:02:29]: ConsoleInput: "c_announce("Debugging...")" [04:02:29]: [Announcement] Debugging... Link to comment Share on other sites More sharing options...
rezecib Posted March 1, 2015 Share Posted March 1, 2015 @Nofew, Okay, so after testing it myself, I think this is a bug in the way it's handling console commands in the shell. It splits the command by space, regardless of what's going on in the command. So while c_announce("test") works, and c_announce("test",1) works, c_announce("test", 1) does not. It didn't seem to let me escape the spaces, either. So I think that's why this isn't enabled by default . @MarkL you might want to look at this behavior for -console on dedicated server shells. Link to comment Share on other sites More sharing options...
Jjmarco Posted March 1, 2015 Share Posted March 1, 2015 @Nofew, @rezecib, Meanwhile you could use the character code for spaces, '\32' Link to comment Share on other sites More sharing options...
KogaBee Posted March 1, 2015 Share Posted March 1, 2015 typing this into the command should do ya. (makes it fun serverwide event (hopefully)) it might spawn hounds and some meteroites. SERVER_TERMINATION_TIMER=900 Link to comment Share on other sites More sharing options...
Developer MarkL Posted March 3, 2015 Developer Share Posted March 3, 2015 @Nofew, Okay, so after testing it myself, I think this is a bug in the way it's handling console commands in the shell. It splits the command by space, regardless of what's going on in the command. So while c_announce("test") works, and c_announce("test",1) works, c_announce("test", 1) does not. It didn't seem to let me escape the spaces, either. So I think that's why this isn't enabled by default . @MarkL you might want to look at this behavior for -console on dedicated server shells. Thanks for reminding me, I'll fix that darn space issue. EDIT: Fixed in the next build. Link to comment Share on other sites More sharing options...
jrose78 Posted March 3, 2015 Share Posted March 3, 2015 While we are on the topic of console commands. I summoned deerclops and when I tried to use TheInput:GetWorldEntityUnderMouse():Remove() with ctrl first it did not work. Using the command without the ctrl crashed my game. Is this a bug? Link to comment Share on other sites More sharing options...
rezecib Posted March 3, 2015 Share Posted March 3, 2015 @jrose78, Use this instead:c_select() c_sel():Remove()it uses a different function that retrieves the client's mouse position instead. As for the crash... it might be nice if it got fixed, but since it only happens if you mess with the console, I don't think it'd be high priority at any time in the near future. But I've encountered that as well. Link to comment Share on other sites More sharing options...
jrose78 Posted March 3, 2015 Share Posted March 3, 2015 @jrose78, Use this instead:c_select() c_sel():Remove()it uses a different function that retrieves the client's mouse position instead. As for the crash... it might be nice if it got fixed, but since it only happens if you mess with the console, I don't think it'd be high priority at any time in the near future. But I've encountered that as well. Thanks Rezecib! Link to comment Share on other sites More sharing options...
absimiliard Posted March 4, 2015 Share Posted March 4, 2015 I'd been getting around this by using underscores for spaces in announcements. I also opened a ticket with my host, killservers, as I'd assumed the problem was in their web-console passing things to the console not in the console itself. Looks like I owe them an apology on that ticket...... Glad to here Mark's getting it fixed, but I think I'll try the suggestion to use /32 and see if that passes through correctly, and if not, back to underscored announcements. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.