Improve Mesh error message;

This commit is contained in:
bjorn 2017-03-11 15:26:43 -08:00
parent d1a8a5b156
commit b417df1de9
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ int l_lovrMeshSetVertices(lua_State* L) {
int vertexCount = lua_objlen(L, 2);
if (vertexCount > lovrMeshGetVertexCount(mesh)) {
return luaL_error(L, "Too many vertices for Mesh\n", lovrMeshGetVertexCount(mesh));
return luaL_error(L, "Too many vertices for Mesh (max is %d, got %d)\n", lovrMeshGetVertexCount(mesh), vertexCount);
}
char* vertices = malloc(mesh->stride * vertexCount);