Quellcode durchsuchen

Fix bad string concat in error messages in spine lua runtime. (#2021)

Matt Roelle vor 3 Jahren
Ursprung
Commit
0407bd8302
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 1 1
      spine-lua/spine-lua/AnimationState.lua
  2. 2 2
      spine-lua/spine-lua/SkeletonJson.lua

+ 1 - 1
spine-lua/spine-lua/AnimationState.lua

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

+ 2 - 2
spine-lua/spine-lua/SkeletonJson.lua

@@ -317,7 +317,7 @@ function SkeletonJson.new (attachmentLoader)
 			if linkedMesh.skin then skin = skeletonData:findSkin(linkedMesh.skin) end
 			if not skin then error("Skin not found: " .. linkedMesh.skin) end
 			local parent = skin:getAttachment(linkedMesh.slotIndex, linkedMesh.parent)
-			if not parent then error("Parent mesh not found: " + linkedMesh.parent) end
+			if not parent then error("Parent mesh not found: " .. linkedMesh.parent) end
 			if linkedMesh.inheritDeform then
 				linkedMesh.mesh.deformAttachment = parent
 			else
@@ -486,7 +486,7 @@ function SkeletonJson.new (attachmentLoader)
 			local _end = getValue(map, "end", nil)
 			if _end then
 				local slot = skeletonData:findSlot(_end)
-				if not slot then error("Clipping end slot not found: " + _end) end
+				if not slot then error("Clipping end slot not found: " .. _end) end
 				clip.endSlot = slot
 			end