• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Purchase history in "Store"

Kownikuzyt

Member
Joined
Feb 11, 2020
Messages
170
Solutions
1
Reaction score
8
Hello, I need help.

I have a problem with keeping my purchase history in "Store".

Store History Problem.png

I share "modules" from "/data/modules" | "modules.zip"
Post automatically merged:

Probably the problem is just here:

Lua:
GameStore.retrieveHistoryEntries = function(accountId)
    local entries = {}
    local resultId = db.storeQuery("SELECT * FROM `store_history` WHERE `account_id` = '0' ORDER BY `time` DESC LIMIT 15;")
    if resultId ~= false then
        repeat
            local entry = {
                mode = result.getDataInt(resultId, "mode"),
                description = result.getDataString(resultId, "description"),
                amount = result.getDataInt(resultId, "coin_amount"),
                time = result.getDataInt(resultId, "time"),
            }
            table.insert(entries, entry)
        until not result.next(resultId)
        result.free(resultId)
    end
    return entries
end
 

Attachments

Last edited:
Back
Top