MillhioreBT / forgottenserver-downgrade

TFS Downgrade 1.5+ is an engine based on nekiro downgrade but highly updated with current tfs code, it also has the lua modules divided and uses lua5.4
GNU General Public License v2.0
19 stars 18 forks source link

bug: quest log "attempt to compare number with nil" #23

Closed kokekanon closed 7 months ago

kokekanon commented 7 months ago

click on quest log in otc or old client console tfs:

Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onNetworkMessage
data/lib/core/quests.lua:20: attempt to compare number with nil
stack traceback:
        [C]: in metamethod 'le'
        data/lib/core/quests.lua:20: in method 'isStarted'
        data/lib/core/quests.lua:142: in method 'getQuests'
        data/lib/core/quests.lua:150: in method 'sendQuestLog'
        ...orgottenserver-downgrade\data\scripts\network\quests.lua:3: in local 'handler'
        data/events/scripts/player.lua:116: in function <data/events/scripts/player.lua:108>
function Quest:isStarted(player)
    return player:getStorageValue(self.storageId) >= self.storageValue
end

player:getStorageValue(self.storageId) is nil


image

player:setStorageValue(1001,1) image

MillhioreBT commented 7 months ago

Solved with this commit: fa5d055