CaveRat Posted March 1, 2016 Share Posted March 1, 2016 I'll be home soon where I can be a bit more descriptive about whats happening. The only other thing I can think of is that unlike what I posted above (I'm fairly confident this is the only difference from my actual code) is that my defaultproperty braces are not on new lines. defaultproperties { ScreenClass = UITacticalHUD; } I'm just so accustomed to having braces on the same line that I have been having trouble breaking them. I suppose depending on what exactly defaultproperties is, that could be part of the problem. Amazingly, this is it. Writing it like that will cause it to not register ScreenClass and use default "none". Link to comment Share on other sites More sharing options...
davidlallen Posted March 1, 2016 Share Posted March 1, 2016 !?! Really? It is whitespace sensitive? If you change it back the old way it stops working? Link to comment Share on other sites More sharing options...
Amineri Posted March 1, 2016 Share Posted March 1, 2016 defaultproperties are a little bit funny. They aren't really "proper" code. I mean, you can choose to leave off the terminating ; on a line and the compile and operate just fine. So I guess in hindsight it's not surprising that they are sensitive to line-feeds. Link to comment Share on other sites More sharing options...
CaveRat Posted March 1, 2016 Share Posted March 1, 2016 !?! Really? It is whitespace sensitive? If you change it back the old way it stops working? I guess. :unsure: I've actually experienced this before with if-elseif statements, only it usually resulted in compiler error. What's strange here is that it compiles just fine. Link to comment Share on other sites More sharing options...
kosmo111 Posted March 1, 2016 Author Share Posted March 1, 2016 Yea, I guess I can understand that. defaultproperties must be some kind of pre-processor thing or something. Oh well, as long as that solves it! I wonder if there are other things that require using new line braces..... I guess I could try more diligently to use that style.... it just seems so wasteful : ( Link to comment Share on other sites More sharing options...
MachDelta Posted March 1, 2016 Share Posted March 1, 2016 DefaultProperties are definitely strange: As mentioned previously, the rules of the defaultproperties block is slightly different from the standard unrealscript syntax. The general differences are: Statements are not allowed in the defaultproperties block, with the exception of dynamic array operations. This means you cannot perform calculations, call functions, etc. The defaultproperties block is solely for assigning literal values to instance variables.Semi-colons can be placed at the end of each line, but are not requiredSpaces should be avoided (such as between variable name, assignment operator, and value).The opening curly brace of the defaultproperties block should be on a new line. See http://udn.epicgames.com/Three/UnrealScriptDefaultProperties.html for all the gory details. There are some gotchas with assigning variables too (arrays, notably). Link to comment Share on other sites More sharing options...
Recommended Posts