Would anyone have a solution for this error? System works in game but is not inserting information into the database
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