Data type Name and space character

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Data type Name and space character

Post by Barbie »

The wiki says that spaces are allowed in the data type Name. Maybe ucc.exe nor UnrealEd have not read the wiki; I was not able to get a space character into a variable of that type. Or is the wiki wrong?
<EDIT>
Finally I succeeded: exported to T3D, edited the name's value with a text editor and reimported into UnrealEd. The double quotes make the difference:
Double quotes DO work:

Code: Select all

Tag="My Trigger"
Single quotes do NOT work (results in a single quote only):

Code: Select all

Tag='My Trigger'
Without quotes do NOT work (results in "My"):

Code: Select all

Tag=My Trigger
Interestingly: if I export that map with a space in a name variable again, it is written as

Code: Select all

Tag=My Trigger
what means that re-importing that T3D file will result in a different value (only "My") for the name variable.
</EDIT>
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Data type Name and space character

Post by sektor2111 »

Not all time a soup with Name and String will do work.
You might even figure compiling errors at using <string> variable for name as long as a <name> variable is expected.
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Data type Name and space character

Post by Wormbo »

Note that what is allowed in a value and what the compiler accepts is not always the same. Also note that defaultproperties are not processed by the UnrealScript compiler, but by the Unreal Text (T3D) importer. And thirdly, the UnrealScript exporter (which uses UnrealText exporter for defaultproperties) does not necessarily generate compilable defaultproperties blocks, if exported values are strange.
Post Reply