• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Spaces in Strings.

Status
Not open for further replies.
When working with the war3map.wts file or GUI triggers (which is basically the same) you have to use the enter key. When directly working with JASS strings the enter key, \r\n and also \r and \n alone work fine.
 
When working with the war3map.wts file or GUI triggers (which is basically the same) you have to use the enter key. When directly working with JASS strings the enter key, \r\n and also \r and \n alone work fine.

Im pretty sure pressing enter simply saves said variable.
Could you explain more about \n?
 
Im pretty sure pressing enter simply saves said variable.
Depends. There are multi-line and single-line GUI string fields.
Could you explain more about \n?
Uhm it's an escape sequence.
GUI operated strings are most often saved in the war3map.wts file, the trigger string file. However the escape sequences are not parsed correctly but as normal separate characters. You still can edit the .wts file directly though.

If you specify a string directly in JASS there is no saving in the .wts file by default and those escape sequences work.
 
Status
Not open for further replies.
Back
Top