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

Windows Topfrags Script Error

hallabackkid101

New Member
Joined
Feb 7, 2009
Messages
100
Reaction score
0
Location
Georgia, Usa
Hello, Im having a problem with a script I have. I believe when a player kills another play its supposed to show the killer frags, but its not working. My engine gave me this error
HTML:
OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: no such column: frags (UPDATE "players" SET "frags" = "frags" + 1 WHERE "id" = 32;)
, What do i need to do? I created a field under players named "frags". Any help is greatly appreciated
Also if I wanted to switch this to storage what would be the process? Change the scripts?

topfrags.lua
PHP:
function onKill(cid, target, lastHit)
if isPlayer(target) then
 db.executeQuery("UPDATE `players` SET `frags` = `frags` + 1 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
end
return true
end
 
Add the column frags like this.
SQL:
ALTER TABLE `players` ADD `frags` INT(11) NOT NULL DEFAULT '0';

For storage, you can set the storage every kill +1.
Example:
Lua:
setPlayerStorageValue(cid, 9000, getPlayerStorageValue(cid, 9000) + 1)
 
Last edited:
Back
Top Bottom