• 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!

Bounty Hunter System mysql error

Azerty

Active Member
Joined
Apr 15, 2022
Messages
316
Solutions
4
Reaction score
32
Would anyone have a solution for this error? System works in game but is not inserting information into the database
bounty.JPG

SQL:
CREATE TABLE IF NOT EXISTS `bounty_hunter_system` (
    `id` int(11) NOT NULL auto_increment,
    `hunter_id` int(11) NOT NULL,
    `target_id` int(11) NOT NULL,
    `killer_id` int(11) NOT NULL,
    `prize` bigint(20) NOT NULL,
    `currencyType` varchar(32) NOT NULL,
    `dateAdded` int(15) NOT NULL,
    `killed` int(11) NOT NULL,
    `dateKilled` int(15) NOT NULL,
    PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Lua:
local function addBountyHunt(player, target, amount, currencyType)
    db.query("INSERT INTO `bounty_hunter_system` VALUES (NULL," .. player:getGuid() .. "," .. target:getGuid() .. ",0," .. amount .. ", '" .. currencyType .. "', " .. os.time() .. ", 0, 0, 0, 0, 0);")
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "[BOUNTY HUNTER SYSTEM] Voce colocou recompensa em " .. target:getName() .. " por uma recompensa de " .. amount .. " " .. currencyType .. "!")
    if config.broadcastHunt then
        Game.broadcastMessage("[BOUNTY_HUNTER_SYSTEM]\n " .. player:getName() .. " colocou uma recompensa em " .. target:getName() .. " por " .. amount .. " " .. currencyType .. ".", MESSAGE_STATUS_WARNING)
    end
return true
end
 

Similar threads

Back
Top