unreal bug?

Hi all…
I have this scene…
http://s11.postimg.org/uf27ehewf/Immagine.jpg
Now “Notte” starts from 0 so why when i add 1 to this variable nothing appears to the screen?
If i set cast failed too and eliminate the branch it works…so it’s a problem of the cast?

hi, can’t see it well or all of it, but are you trying to use the variable before you actually create it?

if that’s the first time you cast & for instance used promote to variable or the first time you’ve set the variable then you can’t use a get node on it yet, basically because it really hasn’t any value as you can tell.
try moving it after the set node :wink:

in the cast my variabale is on default to 0…i have to set it again to 0?
Or i have the set promote to value?

sorry I use a small monitor & can’t even read the name of your variable but from what I can see:

-you have 2 blue lines pulled ‘out’ of the cast node, if the top one is where you set or used promote to variable which is created for you, then the bottom one isn’t even created yet when you try to use it.
move it (you can move it right after the one on top that sets your variable if you want to change it’s value but you’ll have to get it then add the 1 then set it again- top one doesn’t exist till after it’s set)
(you are actually creating an object or to be more exact an object reference - it’s not there when you try to add the 1 to it, not until after you create it)

-you can’t use something that doesn’t exist yet

so basically, you have to get rid of the bottom blue line you pulled out of the cast node. you can do whatever you want to with it after the set node but not before

hope that is clear

note: you can always use a print string node to see of check what your values are

also just saw that this is a Level BP, casting can be completely different in level BPs

put a print after the cast failed and see if the cast is failing. That may be your problem. Otherwise just by glacing at it, it looks correct.

Yes…the cast fails…can someone tell me why?

Put a breakpoint on the variable and inspect it. Or just right click and “watch this value” and you can see what’s happening

nonono i discoevered the error…the cast fails and i would to know why…
If the cast fails the variable isn’t read so nothing can upload it, right?