#Help Pls lol

1 messages · Page 1 of 1 (latest)

dull cove
#

Ez but idk why its not working

glass ravenBOT
#

<@&987246399047479336> please have a look, thanks.

glass ravenBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

dull cove
#

Help guys plsss

frozen python
#

what is your issue?

#

btw, your issue is probably that "5/100" is 0

#

because this is integer division

#

do "dis" is always going to be 0

cobalt hare
#

You are using integer division

#

It all rounds down to 0

#

If you want to round down I'm the normal way, you can do price * 5 / 100 instead of the other way round

#

Or you can also use doubles

#

Using 5.0 or 5D

#

Instead of 5

tall maple
cobalt hare
#

I said if they want to round it down after the calculation they can do that

tall maple
#

ohw

#

that'll still be the same ig

#

let me try

#

ohh no

#

its good

#

im rusty

cobalt hare
#

Np, we all make silly errors

ashen mica
#

@dull cove In addition to the bug you noticed and that the previous messages described, the numbers on the borders won't do what you want them to do.

If price is exactly 2000, it will be neither < 2000 nor > 2001, so neither the first nor the second conditional blocks get triggered.
You have to use <= and >= if you want the numbers at the borders to be included in the if blocks.

dull cove
#

I think so 5.0 will work

cobalt hare
dull cove
#

Works with price*dis/100