+1
Fixed

ads an - to my varibles

dyrwoolf 4 weeks ago in Game Creator updated by Marti (Lead Developer) 3 weeks ago 5 1 duplicate

First i create an varible


Then i go and create a action and chose the vaible, it looks fine

Untill i select it, then it ads a  "-" in front of my varible, so it cant access it.


To get this to work i have to create a new varible with a "-" that it will reference in the action. So i end upp with 2 varibles, one a dummy and one with a "-" infront of it that it uses.

Unity version:
2018.4.12f1
Game Creator version:
1.5

Answer

Answer

I fixed this myself

In LocalVariableSelectWindow.cs

line 44

" " + local.references[j].variable.name,

remove the space between the quotes " "

like this

"" + local.references[j].variable.name,

now there are no minus sighns in the drop down variable selections.

Duplicates 1

Edit: putting my local variables on Player and then selecting player in an action as local variables does not give me a drop down as does local and global. I would also like the drop down by player and not have to type out the variable name.

Answer

I fixed this myself

In LocalVariableSelectWindow.cs

line 44

" " + local.references[j].variable.name,

remove the space between the quotes " "

like this

"" + local.references[j].variable.name,

now there are no minus sighns in the drop down variable selections.

Started

Sorry for the late reply. We've opened a ticket and we're currently looking into this. This is a bug that was probably introduced in 1.0.5 and we'll be fixing as soon as possible.

Started

+1 point to you and -10 for me. Thank you for hunting this down. Worst thins is that the empty space was used as a temporal hack to avoid the name of the variable appearing too close to its icon. And this caught up with us.

Sorry for the trouble. We hope to be releasing a new Game Creator version with this fix (plus some new and very exciting features!)

Fixed

Although the solution you proposed is a good workaround, the problem was rooted a bit deeper but we've just fixed it :-) I'm marking this issue as Fixed as it's already enqueued for the upcoming release. If there are any other issues related to this, feel free to reopen this ticket. Cheers!