Fix concatenation in errors

This commit is contained in:
Roman Szalla 2014-02-11 23:41:27 +01:00
parent 38e54e686d
commit fe82c0d1e6
3 changed files with 5 additions and 5 deletions

View File

@ -168,7 +168,7 @@ function AnimationState.new (data)
function self:setAnimationByName (trackIndex, animationName, loop)
local animation = self.data.skeletonData:findAnimation(animationName)
if not animation then error("Animation not found: " + animationName) end
if not animation then error("Animation not found: " .. animationName) end
return self:setAnimation(trackIndex, animation, loop)
end
@ -184,7 +184,7 @@ function AnimationState.new (data)
function self:addAnimationByName (trackIndex, animationName, loop, delay)
local animation = self.data.skeletonData:findAnimation(animationName)
if not animation then error("Animation not found: " + animationName) end
if not animation then error("Animation not found: " .. animationName) end
return self:addAnimation(trackIndex, animation, loop, delay)
end

View File

@ -133,7 +133,7 @@ function Skeleton.new (skeletonData)
return
end
end
error("Slot not found: " + slotName, 2)
error("Slot not found: " .. slotName, 2)
end
function self:update (delta)

View File

@ -292,7 +292,7 @@ function SkeletonJson.new (attachmentLoader)
local frameIndex = 0
for i,eventMap in ipairs(events) do
local eventData = skeletonData:findEvent(eventMap["name"])
if not eventData then error("Event not found: " + eventMap["name"]) end
if not eventData then error("Event not found: " .. eventMap["name"]) end
local event = Event.new(eventData)
event.intValue = eventMap["int"] or eventData.intValue
event.floatValue = eventMap["float"] or eventData.floatValue
@ -319,7 +319,7 @@ function SkeletonJson.new (attachmentLoader)
local unchangedIndex = 1
for ii,offsetMap in ipairs(offsets) do
local slotIndex = skeletonData:findSlotIndex(offsetMap["slot"])
if slotIndex == -1 then error("Slot not found: " + offsetMap["slot"]) end
if slotIndex == -1 then error("Slot not found: " .. offsetMap["slot"]) end
-- Collect unchanged items.
while originalIndex ~= slotIndex do
unchanged[unchangedIndex] = originalIndex