Negatives in coding. (Solved & thanks for answering all my questions)

How do I make a variable negative in coding. I need to make this negativeScreenshot 2023-12-21 7.14.43 PM I was thinking of subtracting it by itself twice but that doesn’t work

In your number, put - sign like -15, instead of minus 15.

well I want to do that but the variable is determined by a property
Screenshot 2023-12-21 7.18.01 PM

What’s cash amount? A property? Sorry, I’m not that good at this stuff, but I know who is. @HAIASI

the cash amount is the variable that I made, its only used in this coding but would this work?
Screenshot 2023-12-21 7.21.21 PM

the properties are in green

Use math blocks to set a different variable to (multiply property by two), then set the older variable to (property - variable 2)


Ahh, the McDonald’s worker who receives a lot of likes but doesn’t give that many knows how to do it!

yeah it worked! thanks a lot @NavyCatZ

Off-topic and a bit mean.
People can use their likes however they want here.

I don’t mind at all and I just want to show you all I’ve done with your answers to all my questions!

1 Like

This game is basically going to be 4 islands surviving on what they have and advancing in there own ways then fighing eachother (basically bedwars but to get materials you have to do work)

Sorry, but I never said it was a bad thing.

1 Like

It just shows that NavyCatZ doesn’t farm for like badges and if you receive one, you know it’s meaningful.

1 Like

Sounds rly interesting! Btw, in the future when you need to do something like this just multiply the variable by -1 next time, I didn’t think of that and overcomplicated things lol


I updated my bio! Sorry, I forgot!

Oh sorry you didn’t over complicate anything you just helped. Thanks!

Instead of subtracting the number by 2 * itself , you could’ve done this for better optimization:

or this:


Wow I can’t believe you typed it all out in coding and I think it will be easier that way thanks!

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