diff --git a/Server/Components/Pawn/Scripting/Core/Natives.cpp b/Server/Components/Pawn/Scripting/Core/Natives.cpp index c0a131843..163057c9b 100644 --- a/Server/Components/Pawn/Scripting/Core/Natives.cpp +++ b/Server/Components/Pawn/Scripting/Core/Natives.cpp @@ -54,7 +54,14 @@ SCRIPT_API(atan2, float(float y, float x)) SCRIPT_API(floatstr, float(std::string const& string)) { - return std::stof(string); + try + { + return std::stof(string); + } + catch (std::exception e) + { + return 0.0f; + } } SCRIPT_API(GetPlayerPoolSize, int())