ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
208 stars 26 forks source link

"Empty Arrays" instead of the number 0 #163

Closed Saphirah closed 3 years ago

Saphirah commented 4 years ago

Hey Deltin,

first amazing work! Your tool is awesome and especially the pathfinding is astounding! My problem is, right now, whenever I try to add a vector that contains a 0 the output will always create an "Empty Array" instead of a 0. Of cause, this will lead to a failure of importing the script to overwatch. You can see the issue in the screenshot below. Did I do something wrong here?

image

ItsDeltin commented 4 years ago

It is replaced with 'Empty Array' because it uses 2 less elements than 0 and Overwatch would automatically convert it to 0. If you are having this issue, then this behavior was changed.

You can go to the vscode settings and disable the 'Optimize Output' setting, which will prevent 0 from being replaced with empty arrays. Next release will address this.

ItsDeltin commented 4 years ago

I just tested it, and empty arrays are still accepted in vectors. I recreated your script and found the issue to be that the workshop does not accept '0' for the 'Include Players' parameter in the 'Ray Cast Hit Position' function. The solution is to change the 0 to null.

OSTW will need a way to detect incompatible value types.