Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Sending server console commands from script (http://forum.fulqrumpublishing.com/showthread.php?t=27009)

Ataros 10-12-2011 04:35 PM

Quote:

Originally Posted by FG28_Kodiak (Post 348246)
Nothing special, just for testing i tried (Tester was 30sec delay Trigger) :

public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);

if ("Tester".Equals(shortName) && active)
{

System.Console.WriteLine("kick Kodiak");
}
}
I also tried "\r\n" and "\n". I get the message kick Kodiak in console, thats all
So the simply way doesn't exist :rolleyes:

Maybe you did not manage to connect to server within 30 seconds? Could you try OnPlaceEnter with a spawnpoint?

FG28_Kodiak 10-12-2011 04:53 PM

Ive tried it also, but i get only a kick Kodiak message in the console, without execution. :rolleyes:
if i type kick Kodiak in the console and hit enter, i get kicked.

SNAFU 10-12-2011 05:02 PM

Did you try someother commands? Maybe the dedi has troubles kicking the IP it is hosted by or something like that.

FG28_Kodiak 10-12-2011 05:59 PM

I also tried battle stop -> no effect.

salmo 10-12-2011 11:36 PM

So the script is writing to the console, but the command is not executed. Odd? Could it be that the command appears in the console but the cursor has not moved to the next line (ie command not exectuted)?

Does the script need to included the [enter] ie something like System.Console.WriteLine("kick Kodiak" & chr(13));

FG28_Kodiak 10-13-2011 04:18 AM

your chr(13) is \n or \r\n in C#.

salmo 10-13-2011 10:40 PM

Quote:

Originally Posted by FG28_Kodiak (Post 348559)
your chr(13) is \n or \r\n in C#.

So the console comand still does not execute if you send a carriage return with the command? System.Console.WriteLine("kick Kodiak\n");

FG28_Kodiak 10-14-2011 04:23 AM

The server console is only the standard output in this case. Same like "cmd" in Windows if you use Console Applications.


All times are GMT. The time now is 12:43 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.