--- Script by Kekox
function onTimer()
db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end
this one should workfunction onTimer()
db.query("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end
I have this error in the console? :SOTSYS_SQLITE3_PREPARE(): SQLITE ERROR: near "DELETEON": syntax error (CREATE TRIGGER "ondelete_accounts"BEFORE DELETEON "accounts"FOR EACH ROWBEGIN DELETE FROM "players" WHERE "account_id" = OLD."id"; DELETE FROM "account_viplist" WHERE "account_id" = OLD."id"; DELETE FROM "bans" WHERE "type" IN (3, 4) AND "value" = OLD."id";END![]()
[10/04/2011 20:13:18] Lua Script Error: [Action Interface]
[10/04/2011 20:13:18] data/actions/scripts/vipmedal.lua:onUse
[10/04/2011 20:13:18] data/actions/scripts/vipmedal.lua:3: attempt to call global 'getPlayerVipDays' (a nil value)
[10/04/2011 20:13:18] stack traceback:
[10/04/2011 20:13:18] [C]: in function 'getPlayerVipDays'
[10/04/2011 20:13:18] data/actions/scripts/vipmedal.lua:3: in function <data/actions/scripts/vipmedal.lua:2>
Do you added the functions to the libs?