Why is my variable a read-only variable?


I was following a tutorial by Ryan Laley on the inventory system, however i cannot set any values for the variables since they are read only? I was wondering how to fix this, in the tutorial, he was absolutely fine.

Hi, how are you trying to set your text variable ?

Can you try to get TXT_Quantity and after that try to add the node “Set Text(Text)” ?

1 Like

It looks like you have the wrong type, texture instead of text?

on the designer, i just ticked the IsVariable box

I don’t know how to fix that though, since I am not the one manually setting it, but the engine

What I’m saying is, you’ve defined it as a ‘texture’, not ‘text’ :slight_smile:

The variable is fine, it’s a text block reference. This variable is not text, it’s a widget that can hold text data. The default value goes here:

To assign textblock’s text value dynamically, follow @Ryunawa1’s suggestion.

Alternatively, create a text variable and bind it (see pic, on the right). You may also use the Quanitity [sic] integer there. The text block widget will then poll data off that variable.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.