I dont know if it will solve your problem, but remove the last ' , ' on this part:
conf["upgrade"] = { -- how many parcent attributes are rised?
attack = 5, -- attack %
extraAttack = 10, -- extra Attack %
defense = 5, -- defence %
extraDefense = 10, -- extra defence %
armor...