If you are importing a code, read the first section, if you are copy pasting a code snippet, skip to the second section
Section 1
The latest update has introduced “Sort Order” to Workshop Settings. This new value allows you to, as you might guess, sort your Workshop Settings. All code made before this update has been automagically updated, but unfortunately this transition seems to have gone wrong for some specific situations.
Here’s 2 examples that have gone wrong;
Global.A = Workshop Setting Real(Custom String("Game"),
Custom String("Time Inbetween Hero Swaps (In Minutes)"),
1, 0.200, 5, 18550) * ;
Event Player.CurrentEffectLoop =
Event Player.CurrentEffectLoop >= Workshop Setting Integer(
Custom String("Config"),
Custom String( "Max projectile effects per player "),
10, 1, 10, 18550) - ? 0 : Event Player.CurrentEffectLoop + 1;
The first example is the most obvious. At the very end of the line you will notice how it suddenly multiplies by nothing.
The second example subtracts by nothing in the last line.
In both of the examples you will notice the number “18850”. This is the new Sort Order, but for whatever reason the automatic conversion chose this very specific and large number. You can leave that number be, but any Workshop Setting you find with this number is likely broken.
To fix open the Action, and re-add the number that is now gone. In the first example that’s the very last number that we wanted to multiply by. In the second example that’s the number we wanted to subtract. Both are set to “0” in the Interface, but are set to nothing in the actual code. Set it to any number that is not 0, and you code will be fixed.
If you’re still not exactly sure what I am saying; Open your actions that have Workshop Settings in them. Set any number that is “0” to any other number. Save the action, and your code should be fixed. You can re-set values to “0” at this point if you like.
Section 2 - If you are copy pasting a code snippets, start here
The new update has changed the way a number of values are written. These are:
- Colors
- Buttons
- Workshop Settings
Any code snippet you have that use these values will need to be manually edited in a text editor.
Colors
Color values used to be simply the color name Red, Blue, etc. You will find these in effects, HUD texts, In-World Texts, etc. These need to be changed to Color(Red), Color(Blue). Hopefully in many cases a find-replace-all will make it easy enough in your text editor.
For example:
Create Effect(All Players(All Teams), Sphere, Orange, Event Player, 1, None);
Will need to be changed to
Create Effect(All Players(All Teams), Sphere, Color(Orange), Event Player, 1, None);
Buttons
Buttons are similar to colors. Their values used to simply be Jump, Primary Fire, etc. They have now been changed to Button(Jump), Button(Primary Fire).
For example:
Allow Button(Event Player, Jump);
Will need to be changed to
Allow Button(Event Player, Button(Jump));
Workshop Settings
Workshop settings have been giving a new argument, “Sort Order”. This new argument appears at the end of the value.
For example:
Workshop Setting Integer(Custom String("A"), Custom String("B"), 45, 10, 120);
Will need to be changed to
Workshop Setting Integer(Custom String("A"), Custom String("B"), 45, 10, 120, 1);
Notice the extra , 1 at the end. This can be any number.
I hope this helps. If it doesn’t, please post your code and I will try and help you out.