LogScript:Warning: Divide by zero

When the output log shows:

LogScript:Warning: Divide by zero: Divide_FloatFloat

is there an easier way to identify the exact [÷] node causing the warning or would I have to debug each and every [÷] node until I find it?

The DivByZero isn’t causing any problems (presumably the engine is handling it gracefully) but I would still like to resolve these warnings if possible.

Hey -

The node that is causing the warning should have a yellow warning bar below the name. Another option would be to add a breakpoint (Right click the node → Add Breakpoint) to each divide node. This will allow you to play the level and step through the blueprint, pausing each time a divide node is triggered. This should help you narrow down where the warning is coming from.


1 Like

Will do.
Thanks .

is there an easy way to find all the divide nodes? I’m having this show up in my logs and I’m dreading spending the 30 minutes going over my code with a fine tooth comb - could we get this log entry to be a little more useful?

In your blueprint graph:

press CTRL+F and search for each of the following:

“Division” “/float” “/byte” “/int” “/vec”

It’s a little tedious if you have 20+ nodes to check but it’s the only way.

Just run PIE and debug/watch the Divisor (lower) value of each suspect division node. Eventually you’ll find one with a Divisor input value of 0.

1 Like