Help with property types

okay, so in my game, steal a pet, im storing the money per second of the pets in your base in a text property (which I cant change), but since the money is stored in a number property, they wont add together at all, any suggestions?

1 Like

uhhh okay ty ig

What do you mean by that? Did I solve your issue/problem?

nope, my problem is much more technical, just confused by the

Post deleted by author bye

yk

(post deleted by author)

1 Like

Unfortunately, there is no built-in functionality to convert text to numbers. You’d have to make your own with blocks.
The best course of action would probably be to look in your system to see if you can have the property be a number property instead of a text property. But, if you really can’t, and you haven’t gotten a solution, I’ll see if I can write up some block code to turn text into numbers when I have the opportunity.

3 Likes

Post deleted by author

The issue is, (I’m still workin on steal a brainrot) I have my system set the base1.pos1.data property (the money per second of the pet) right from the name tag data using get in text blocks, which for some reason doesn’t allow it to save to a number property so I have to use text. any solution you might have would be much appreciated

1 Like

You can. If I remember correctly (thanks to bh for this info), then set a variable to the substring containing the number you want to add. Then, set another different variable to that variable + money property.
Not 100% sure this works but this is what I remember.

3 Likes

I’m so sorry, but would you mind going into a lil more detail? (Im a lil stoopid)

1 Like

Ok I couldn’t remember exactly what haha, so I just decided to make my own system converter for this based off the same principles (because why not).
Here’s the blocks for my example:


var1 should just be you getting your money per second, and changing var2 should be attached to your money property (instead of just changing it by 25).
And of course I set it to text so I could check if it works, but you can set your property to it now.
Pic of me celebrating:

Have a nice evening and good luck with your game!

5 Likes

ik this is off topic, BUT TYSMM I was struggling for sooo long with that your actually the best

4 Likes

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