Results 1 to 2 of 2

Thread: localized strings (help)

  1. #1
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts

    localized strings (help)

    hey guys.

    Lately I've been working on a mod (kinda 'classic' one, not zombies), and I've been stuck with localized strings.

    The thing is, I want the mod to be for spanish & english people, and when I was doing a script (a killstreak one) I wanted to use a localized string with multiple 'variables' (&&1, &&2... idk how to call those ^^). The thing is, when I use this:

    PHP Code:
    iprintln(game["blabla"], self.nameattacker.nameself.pers["killstreak"]) 
    with (it's not like this, I just put directly the string the variable refers to. Everything is precached and that),

    PHP Code:
    game["blabla"] = "&&1 stopped  &&2 's killing spree of &&3 kills!"
    the game prints the information of self.name, attacker.name and self.pers["killstreak"] altogether where this thing, &&1, is. Like this:

    Let's guess self.name = Pollo1; attacker.name = Pollo2; killstreak = 3

    Pollo1Pollo23 stopped &&2 's killing spree of &&3 kills!
    BUT the funny part is that when I replace &&2, &&3, &&4... with &&1, when I run the local server and join it, the game throws me an "Invalid game folder" error (wtf)

    Do you guys know how can I print that info correctly? It may be a dumb question but, I've been hitting my head against the wall today for a long time. Any help is appreciated.

    Ty

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    https://killtube.org/showthread.php?...out-precaching

    Or
    just show a cvar in hud.menu, then setcvar it.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. The Following User Says Thank You to IzNoGoD For This Useful Post:

    pollo (5th May 2016)

Posting Permissions

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