Update ObjectVariables.lua

Fix lua error : |
This commit is contained in:
Rochet2
2014-04-19 01:51:30 +03:00
committed by Foereaper
parent 6fc67571c7
commit 6074f5cf6f

View File

@@ -18,7 +18,7 @@ local T = {}
function Object:GetData(instance) function Object:GetData(instance)
assert(self, "ObjectVariables: self was nil") assert(self, "ObjectVariables: self was nil")
if(instance) then if(instance) then
if(not self:GetInstanceId or not self:GetMapId) then if(not self.GetInstanceId or not self.GetMapId) then
error("instance is true and object is not worldobject", 2) error("instance is true and object is not worldobject", 2)
end end
local map = -self:GetMapId() local map = -self:GetMapId()
@@ -41,7 +41,7 @@ end
function Object:RemoveData(instance) function Object:RemoveData(instance)
assert(self, "ObjectVariables: self was nil") assert(self, "ObjectVariables: self was nil")
if(instance) then if(instance) then
if(not self:GetInstance or not self:GetMapId) then if(not self.GetInstance or not self.GetMapId) then
error("instance or map is true and object is not worldobject", 2) error("instance or map is true and object is not worldobject", 2)
end end
local map = -self:GetMapId() local map = -self:GetMapId()