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

(TFS 0.4 + ZNOTE AAC) RUNE PREMIUM POINTS

afferek

New Member
Joined
Oct 16, 2018
Messages
12
Reaction score
0
Hi ! i have problem, Rune giving premium points to shop

Code:
local cfg =
{
    points = 100,
    effect = CONST_ME_GIFT_WRAPS
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(not isPlayer(itemEx.uid)) then
        return false
    end

    db.executeQuery("SELECT `id`, `points` FROM `znote_accounts` WHERE `account_id`")
    doCreatureSay(cid, "You have received " .. cfg.points .. " premium points!", TALKTYPE_ORANGE_1, false, nil, toPosition)
    doSendMagicEffect(toPosition, cfg.effect)
    doRemoveItem(item.uid, 1)
    return true
end

No points added :/ help..
 
Well, I've changed some lines and it worked good with me but i am using gesior so try this one it should work good, and if it isn't work then the problem will be in znote code not in the main script.
Code:
local cfg =
{
    points = 100,
    effect = CONST_ME_GIFT_WRAPS
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    db.executeQuery("UPDATE `znote_accounts` SET `premium_points` = `premium_points` + " .. cfg.points .. " WHERE `id` = " .. getPlayerAccountId(cid))
    doCreatureSay(cid, "You have received " .. cfg.points .. " premium points!", TALKTYPE_ORANGE_1, toPosition)
    doSendMagicEffect(toPosition, cfg.effect)
    doRemoveItem(item.uid, 1)
    return true
end
 
not working :/

[14:2:27.656] mysql_real_query(): UPDATE `znote_accounts` SET `premium_points` = `premium_points` + 100 WHERE `id` = 33 - MYSQL ERROR: Unknown column 'premium_points' in 'field list' (1054)


"You have received 100 premium points!"

You have 0 points. (Buy points).
 
Back
Top