Fix Lua error message for WPos subtraction

This commit is contained in:
Curtis Shmyr
2016-10-29 13:56:01 -06:00
parent 04dbda6dcd
commit b1bea831de

View File

@@ -95,7 +95,7 @@ namespace OpenRA
WPos a; WPos a;
var rightType = right.WrappedClrType(); var rightType = right.WrappedClrType();
if (!left.TryGetClrValue(out a)) if (!left.TryGetClrValue(out a))
throw new LuaException("Attempted to call WPos.Subtract(WPos, WVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, rightType)); throw new LuaException("Attempted to call WPos.Subtract(WPos, (WPos|WVec)) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, rightType.Name));
if (rightType == typeof(WPos)) if (rightType == typeof(WPos))
{ {
@@ -110,7 +110,7 @@ namespace OpenRA
return new LuaCustomClrObject(a - b); return new LuaCustomClrObject(a - b);
} }
throw new LuaException("Attempted to call WPos.Subtract(WPos, WVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, rightType)); throw new LuaException("Attempted to call WPos.Subtract(WPos, (WPos|WVec)) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, rightType.Name));
} }
public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right) public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right)