WARNING:DLIB: Unable to convert '0.0' to int

Not sure what this error means, how I triggered it how to fix it hahaha!
It only happens when I Build from the editor, but not when I Build HTML5

any clues my fellow Defolders? thanks!!

Are you using any custom shaders? It is likely that you have a declared int which you are trying to assign a float (the 0.0).

int foo = 0.0;

The opposite can also be a problem when you try to assign an int to a float, for instance:

float foo = 1;   // bad
float bar = 1.0; // good
1 Like

This error is likely caused by the new render_script in Defold 1.6.2.

In the game.project file, we have set values for clear colors in the range [0…1]. However, the render_script is attempting to parse int values:

color.x = sys.get_config_int("render.clear_color_red", 0)
color.y = sys.get_config_int("render.clear_color_green", 0)
color.z = sys.get_config_int("render.clear_color_blue", 0)
color.w = sys.get_config_int("render.clear_color_alpha", 0)

(Source: Defold Pull Request #8108)

5 Likes

No, I have yet to have to guts to mess with the render/shader stuff hahaha! I did sort it tho!

They were all at 0 in the game.project → render. But I did notice two of them had the reset arrows , so I clicked them and warning gone! I can’t say I understand, but it worked out, thank you!

Me neither :laughing: We’re looking into it!

1 Like