ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
207 stars 24 forks source link

Exception bug: The variable [name] is not assigned to an index #406

Open NS-Unfair opened 1 year ago

NS-Unfair commented 1 year ago

In short, formatted strings are bugged. For example, if you have an array of formatted text like this:

globalvar String[] ObjectiveDesc = [
    '',
    $"Capture Point {point_name}", // The $ strings make the exception happen
    $"Capture the Flag ({flagcapture_count}/∞)",
    $"Kill {deathmatch20_kills_left} target"
];

You get an exception that shouldn't happen. This only happens if you have multiple scripts. I also made sure to import the scripts as well before I defined this array. You can fix this issue by making a rule that sets this array.