Results 1 to 8 of 8

Thread: Console messages disappeared?

  1. #1
    Supporting Member
    Join Date
    Sep 2019
    Location
    Yorkshire
    Posts
    138
    Post Thanks / Like
    Total Downloaded
    1.39 GB

    Solved ~ Console messages disappeared?

    I've got scripts that show console messages using Console.WriteLine but recently they have stopped appearing in the console/log. I know the script is running because there are also gpHUDLog messages, which are showing.

    Is this a conf.ini setting? Here is my console section:

    Code:
    [Console]
      IP=20001
      UseStartLog=1
      WRAP=1
      PAUSE=1
      HISTORY=1
      HISTORYCMD=1
      PAGE=20
      LOG=1
      LOGTIME=1
      LOAD=console.cmd
      SAVE=console.cmd
      LOGFILE=log.txt
      LOGKEEP=0
    I tried a previous backup conf.ini but it looks the same as above.

    What have I accidentally changed to stop these messages appearing?

    All other console messages show correctly - battle begins, aircraft shot down etc. Just not my script messages.


    They are not showing in the console info window or in log.txt

    Thanks
    Last edited by Marcost; Dec-11-2020 at 07:41.

  2. #2
    ATAG Member ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    986
    Post Thanks / Like
    Total Downloaded
    908.31 MB

    Re: Console messages disappeared?

    How about:

    GamePlay.gpLogServer("My Message");

  3. #3
    Supporting Member
    Join Date
    Sep 2019
    Location
    Yorkshire
    Posts
    138
    Post Thanks / Like
    Total Downloaded
    1.39 GB

    Re: Console messages disappeared?

    Yes that works but I was using Console.WriteLine because I dont want the "Server:" prefix to the messages

    Why would Console.WriteLine suddenly stop working?

    Thanks

  4. #4
    ATAG Member ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    986
    Post Thanks / Like
    Total Downloaded
    908.31 MB

    Re: Console messages disappeared?

    Quote Originally Posted by Marcost View Post
    Why would Console.WriteLine suddenly stop working?

    Server log output and Console output are separate items on the info window configuration. You should check that the window is set up correctly.

  5. #5
    Supporting Member
    Join Date
    Sep 2019
    Location
    Yorkshire
    Posts
    138
    Post Thanks / Like
    Total Downloaded
    1.39 GB

    Re: Console messages disappeared?

    I have windows set up for both. They both show messages but neither shows the messages from scripts. It worked last week.

    Thanks

  6. #6
    ATAG Member ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    986
    Post Thanks / Like
    Total Downloaded
    908.31 MB

    Re: Console messages disappeared?

    Are you sure the script is still running? Are you compiling from within the FMB and getting an 'OK' message?

  7. #7
    Supporting Member
    Join Date
    Sep 2019
    Location
    Yorkshire
    Posts
    138
    Post Thanks / Like
    Total Downloaded
    1.39 GB

    Re: Console messages disappeared?

    I've never used the FMB for scripts, I edit with VS or notepad++ and use the console messages to debug. Script error messages still show up fine.

    Yes I'm sure the script works - if I simply change the message instruction to GamePlay.gpLogServer then the message shows fine.

    Is it more likely to be a setting somewhere? I had to rebuild last week after a crash deleted my conf files.

    Thank you for your suggestions Oskar

  8. #8
    Supporting Member
    Join Date
    Sep 2019
    Location
    Yorkshire
    Posts
    138
    Post Thanks / Like
    Total Downloaded
    1.39 GB

    Re: Console messages disappeared?

    Ok, not to be beaten on this so I rebuilt the conf.ini with default and the only difference to mine is this line under [RTS]:

    scriptAppDomain=0

    I added this to my conf.ini and the messages are back.

    Many thanks for your suggestions Oskar

    Regards,

    Martin

  9. Likes fenbeiduo liked this post

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •