consoll error:
script:
local t, storage = {
{160, 25},
{190, 30},
{220, 30},
}, 256
function onAdvance(cid, skill, oldLevel, newLevel)
if skill ~= SKILL__LEVEL then
return true
end
for i = 1, #t do
local v = t
if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
do db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
doCreatureSetStorage(cid, storage, i)
doPlayerSendTextMessage(cid, 19, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
end
end
return true
end
anyone knows whats wrong?
rep++
- - - Updated - - -
right pic now
script:
local t, storage = {
{160, 25},
{190, 30},
{220, 30},
}, 256
function onAdvance(cid, skill, oldLevel, newLevel)
if skill ~= SKILL__LEVEL then
return true
end
for i = 1, #t do
local v = t
if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
do db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
doCreatureSetStorage(cid, storage, i)
doPlayerSendTextMessage(cid, 19, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
end
end
return true
end
anyone knows whats wrong?
rep++
- - - Updated - - -
right pic now