mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
Fix concatenation in errors
This commit is contained in:
parent
38e54e686d
commit
fe82c0d1e6
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user