Merge pull request #12317 from cjshmyr/lua-wpos-subtract-error

Fix Lua error message for WPos subtraction
This commit is contained in:
Paul Chote
2016-10-30 14:51:38 +00:00
committed by GitHub

View File

@@ -95,7 +95,7 @@ namespace OpenRA
WPos a;
var rightType = right.WrappedClrType();
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))
{
@@ -110,7 +110,7 @@ namespace OpenRA
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)