Wezza
lua nOOb
- Joined
- May 31, 2008
- Messages
- 2,278
- Reaction score
- 31
Hello,
The idea from this function is to set the Guild which deals most dmg to a monster to become the owners of a castle... http://grand-ot.ddns.net/?subtopic=thecastle
when someone kills the King of the castle, It doesn't update the database for the new guildid owners..
The table name is Castle, and 2 columns in it, guildid and time..
for example if Guildid = 1 are the current castle owners, when guildid = 2 kill the king of the castle they, should become the castle owners but it doesn't update the column in the database (guildid)..
no errors in console, but maybe I wrote the queries wrong for the database;
please help
The idea from this function is to set the Guild which deals most dmg to a monster to become the owners of a castle... http://grand-ot.ddns.net/?subtopic=thecastle
when someone kills the King of the castle, It doesn't update the database for the new guildid owners..
The table name is Castle, and 2 columns in it, guildid and time..
Code:
function setCastleOwners(id, time)
db.executeQuery("UPDATE `castle` SET `guildid` = '" .. id .. "', `time` = '" .. time .. "' WHERE `time` > 0;")
end
for example if Guildid = 1 are the current castle owners, when guildid = 2 kill the king of the castle they, should become the castle owners but it doesn't update the column in the database (guildid)..
no errors in console, but maybe I wrote the queries wrong for the database;
please help