Having a small issue with an expression

so I’m trying to get the negative of a number mid game. I came up with this:


I thought it should work (though I’m sure there’s a better way of doing it) but I’m just not exactly sure what to type into the equation part of an expression. I know what to do for division / adding + and subtracting - but I have no idea what to do for multiplication. I’ve tried () and X but neither of those seem to be working.

sorry I’m pretty new to using expressions on here

3 Likes

use *
you can get it with shift+8

3 Likes

Try (A*2)-B
I think the parentheses’ placement is messing with the output.

2 Likes

the error is because

A(2)

Is trying to call a function named A with a parameter of 2

If you know the value is positive, and you want to negate it, then a simple way is to just multiply by -1, like this:


A * -1
2 Likes

wait can you define and use functions in flowlab?!?

1 Like

No. :upside_down_face:

1 Like

darn.

1 Like

Heck :upside_down_face:

1 Like

thanks @grazer and @DraftyScienceCoat75

It’s working great now. I’m trying to use it for a canoe paddle that’s thrown like a boomerang lol
image

1 Like

Niiice :upside_down_face: :+1:

Gotta love that cold-blooded murder
image

2 Likes

@hihilogic sssssssssshhhhhhhhhhhhhhhhh

try drinking the tea lol
or shooting it

1 Like

: - ()
SPOOKY
HE AINT A FRENLY

2 Likes