View Single Post
08-17-16, 08:53 PM   #1
Vince Noir
A Defias Bandit
AddOn Compiler - Click to view compilations
Join Date: Mar 2008
Posts: 2
Fix for caged Battle Pets breaking CargBags

Hi,

I recently had errors with battle pets breaking cargbags, error was something like the following:
Code:
Error in style.lua:72
cannot compare a string with an integer
attempted to compare "0000000000000000" with 118805
where style.lua:72 is
Code:
return v1[1] > v2[1] -- group identical item ids
Given that I don't know lua I've chucked a dirty hack in before this to fix it, but if there's a lua str->int function that would probably be better.
Code:
if (v1[1] == "0000000000000000") or (v2[1] == "0000000000000000") then return (v2[1] == "0000000000000000") end 
return v1[1] > v2[1] -- group identical item ids
If anyone else is having the same issue you can edit your style.lua to match this, or if the addon maintainers know a better way to do it then that's great. Tried just wrapping them with tonumber() but that broke ilvl showing up and i cbf digging as to why.
  Reply With Quote