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

Solved [Movements] OnStepIn update player skills(db.query)

Move
Code:
local pid = getPlayerGUID(cid)
Under
Code:
function onStepIn(cid, item, position, fromPosition)
And under
Code:
if (not isPlayer(cid)) then
return true
end
Incase a monster or npc walks on it.

It is using cid, so it needs to be in a function with the parameter cid (function onStepIn(cid, item, position, fromPosition)).
 
@Limos thanks, now here
Code:
if (getPlayerStorageValue(cid, 1254) == 1) and isPaladin(cid) == true then
            setPlayerStorageValue(cid, 1254, 0)
             doRemoveCreature(cid)  
            db.executeQuery("UPDATE players SET level = 20, experience = 98800, maglevel = 0, health = 185, mana = 35, healthmax = 185, manamax = 35, WHERE name ='"..name.."';")
             db.executeQuery("UPDATE `player_skills` SET `value` = '30' WHERE player_id = " .. pid)
            return true
end

i get this error:
Code:
OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: near "WHERE": syntax error (UPDATE players SET level = 20, experience = 98800, maglevel = 0, health = 185, mana = 35, healthmax = 185, manamax = 35, WHERE name ='Nelsin';)
 
Back
Top