How can I make tf_gamerules display map objective text with commas?

Discussion in 'Mapping Questions & Discussion' started by Sergis, Sep 13, 2010.

  1. Sergis

    aa Sergis L666: ])oo]v[

    Messages:
    1,871
    Positive Ratings:
    1,131
    i cant write it as SetRedTeamGoalString output parameter because text after comma gets discarded. so if i write "Capture points A, B and C!" i get "Capture points A".
    i checked .vmf and it seems it's because output parameters are comma delimited.
     
  2. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    Try a \, instead. Can't guarantee that will work, but backslashes are programmer lingo for special characters. " delineates the start and end of a string, so to get a literal " you have to use \" (and you need a \\ to get a literal backslash).

    But I wouldn't be surprised if Source followed that convention.
     
    • Thanks Thanks x 1
  3. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    I think you can use \, because game_text supports SOME escape characters. That said, you can never ever use \"

    EDIT:

    No, it's not possible. \ also ends the string.
     
    • Thanks Thanks x 1
    Last edited: Sep 13, 2010
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    Except the irony here is Hammer no longer does. Some time along the way they made it so when you are typing filepaths into entity properties it auto-corrects backslashes to forwardslashes, except they failed and it applies to anything, so if you try to put Line one\nLine Two in a game_text it becomes Line one/nLine Two and fails. /angryface
     
    • Thanks Thanks x 1
  5. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    I think this is the only possible reply.
     
  6. Sergis

    aa Sergis L666: ])oo]v[

    Messages:
    1,871
    Positive Ratings:
    1,131
    i tried forward and backward slashes and that didnt work. saved map, loaded and the text after comma was gone.