phil123456
(phil123456)
January 5, 2022, 10:32am
1
Hi,
I just spent one hour trying to debug a variable that was not set, before realizing I accidentally created a variable with the same name
now why did UE4 editor did not warn me about this ?
simplified example, I have a lot more variables in my blueprint, which made me finding the issue a bit more complicated
that laxity concerning variables and functions naming convention is just ludicrously annoying
I knew it would cause problems at some point, when I noticed that couple of years ago
… and here it is in it’s magnificent glory
I mean it completely annihilates the efforts of having a warning when 2 variables spells exactly the same , doesn’t it ?
just my 2 cents
1 Like
Nawrot
(Nawrot)
January 5, 2022, 1:49pm
2
Go for C++ have fun with pointers.
Seriously adopt some naming convention and stick to it.
6 Likes
Idk, just don’t make two variables with the same names. Just organize your variables, with a junk variable folder, and use that.
2 Likes
pezzott1
(pezzott1)
January 5, 2022, 3:19pm
4
SomeVariable vs Some_Variable?
1 Like
Limanima
(Limanima)
January 5, 2022, 4:34pm
5
To be fair, the variables don’t have the same name.
One has a space the other doesn’t.
6 Likes
GarnerP57
(GarnerP57)
January 5, 2022, 4:38pm
6
The Editor blueprint nodes display them the same way though I think that is what this rant is about.
I also never liked that Nodes get auto formatted.
Some Variable = Some Variable
Some_Variable = Some Variable
SomeVariable = Some Variable
1 Like
If you are a coder and you label your variable as “somevariable” (or any derivation there of that causes issues)
stop calling yourself a coder.
take some coding classes.
Literally the first thing any course, book, or introductory tutorial covers is how to properly name your variables…
2 Likes
Lmao, I sometimes just name a variable test and then delete it, though usually if I’m gonna keep using it I’ll just name it normally
maybe you started programming a couple of months ago…
why would variables contain spaces at all ?
it should not
problem solved
You wouldn’t call yourself anything if you started a couple of months ago. Even the most inflated and pompous ego in the world would realize they don’t know jack 2 months in…
In which case, see pint #2 …
kamesan
(kamesan)
January 6, 2022, 9:47am
11
This is the point.
The autorenaming is unbelievable.
A true coder will never accept auto renaming.
1 Like
Uncheck “Show Friendly Variable Names” in editor preferences.
6 Likes
GarnerP57
(GarnerP57)
January 6, 2022, 1:46pm
14
Good to know. Never knew that was an option thanks.
1 Like
kamesan
(kamesan)
January 6, 2022, 2:30pm
15
Thank you for that.
i suddenly need to poop.
1 Like
phil123456
(phil123456)
January 8, 2022, 8:57am
16
but does it forbid spaces when we input a variable name ?
DomusLudus
(DomusLudus)
January 8, 2022, 9:11am
17
if you have problems with the spaces you can use the automatic system it never fails
In reality, Spaces should be forbidden no matter what really.
Sure BP does it’s own thing, but spaces in variable names are just confusing for everyone/everything.
I think we can all agree on that. Even people who have never coded before…
That said, what is this “automatic system”?
Will it read my mind and create the correctly typed variable for me?
1 Like
phil123456
(phil123456)
January 8, 2022, 6:20pm
19
that’s not the point, I know camel case/pascal case and underscores
the issue is that for some reason I had two variables, usualy I dont use spaces
but here we are
No, it still allows spaces, as well as these characters:
If you don’t want spaces, just don’t put spaces.
Considering visual scripting isn’t written coding, it makes sense that they would allow spaces & other characters in variable names because you don’t need spaces & symbols to separate parts of code. Whether you should actually use a space or other symbols is up to you; it’s a freedom, not a necessity.
1 Like
jwatte
(jwatte)
January 8, 2022, 7:39pm
21
Yes!
If the variable names arent i
or foo
, you’re just a poser trying to look good!
1 Like