diff --git a/source/simulation/Entity.cpp b/source/simulation/Entity.cpp index b6477fbbb4..8ef377af36 100755 --- a/source/simulation/Entity.cpp +++ b/source/simulation/Entity.cpp @@ -546,7 +546,7 @@ JSBool CEntity::Construct( JSContext* cx, JSObject* obj, unsigned int argc, jsva if( !baseEntity ) { *rval = JSVAL_NULL; - JS_ReportError( cx, "No such template: %ls", CStr8(templateName).c_str() ); + JS_ReportError( cx, "No such template: %s", CStr8(templateName).c_str() ); return( JS_TRUE ); } @@ -619,8 +619,8 @@ bool CEntity::Order( JSContext* cx, uintN argc, jsval* argv, bool Queued ) } try { - newOrder.m_data[0].location.x = g_ScriptingHost.ValueToDouble( argv[1] ); - newOrder.m_data[0].location.y = g_ScriptingHost.ValueToDouble( argv[2] ); + newOrder.m_data[0].location.x = (float)g_ScriptingHost.ValueToDouble( argv[1] ); + newOrder.m_data[0].location.y = (float)g_ScriptingHost.ValueToDouble( argv[2] ); } catch( PSERROR_Scripting_ConversionFailed ) { diff --git a/source/simulation/scripting/JSInterface_Entity.cpp b/source/simulation/scripting/JSInterface_Entity.cpp index 1274ca0461..78012af445 100755 --- a/source/simulation/scripting/JSInterface_Entity.cpp +++ b/source/simulation/scripting/JSInterface_Entity.cpp @@ -106,7 +106,7 @@ JSBool JSI_Entity::construct( JSContext* cx, JSObject* obj, unsigned int argc, j if( !baseEntity ) { *rval = JSVAL_NULL; - JS_ReportError( cx, "No such template: %ls", CStr8(templateName).c_str() ); + JS_ReportError( cx, "No such template: %s", CStr8(templateName).c_str() ); return( JS_TRUE ); } JSI_Vector3D::Vector3D_Info* jsVector3D = NULL;