# \[REQUEST\] Wrapping with Error Checking for BP Math functions

**URL:** <https://forums.unrealengine.com/t/request-wrapping-with-error-checking-for-bp-math-functions/370808>\
**Category:** Feedback & Requests\
**Tags:** unreal-engine, FeatureRequest, Blueprint, question\
**Created:** [September 17, 2016, 6:51pm UTC](https://forums.unrealengine.com/t/request-wrapping-with-error-checking-for-bp-math-functions/370808 "2016-09-17T18:51:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ambershee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ambershee](https://forums.unrealengine.com/u/ambershee)\
**Post date:** [September 17, 2016, 6:51pm UTC](https://forums.unrealengine.com/t/request-wrapping-with-error-checking-for-bp-math-functions/370808/1 "2016-09-17T18:51:36Z")

</div>

Hello!

I tripped myself up with a silly error today, which thankfully didn’t take too long to resolve, but I can see how it could potentially cause issues for others later down the line.

Consider the following image:  
[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/7/887f23405a1fa1149c02850c1fdd575c189057df.png) ](https://snipboard.io/R9Kjk3.jpg)

The math function ‘Random Int in Range’ has been supplied an invalid range, and has returned ‘1’. Since this is in visual script, I would expect it to throw a warning that the function has been supplied an invalid range.

Since blueprints are script and has less performance requirements, and that it is both easier to trip oneself up with small errors and considerably harder to debug than it is in C++, My request would be that all similar math functions rather than being directly mapped to their C++ equivalents, should have an additional layer of wrapping to throw relevant warnings with functions are misused. This could _really_ help debug issues in more complex use cases where it may not be immediately obvious that invalid ranges are being supplied.

Thanks!
