Venn
Member
- Joined
- Aug 16, 2009
- Messages
- 547
- Reaction score
- 20
i got a script and when running tfs it say that missing "<" at line 1
Start tag expected
anyone now how to fix that ?
Start tag expected
anyone now how to fix that ?
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name = "Reward For Level" version = "1.0" author = "Teckman" enabled = "yes">
<config name="RewardFuctions"><![CDATA[
function getPlayerVipReward(cid)
local Info = db.getResult("SELECT `reward` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
if Info:getID() ~= LUA_ERROR then
local bolean= Info:getDataInt("reward")
Info:free()
return bolean
end
return LUA_ERROR
end
function doAddReward(cid, bolean)
db.executeQuery("UPDATE `accounts` SET `reward` = `reward` + " .. bolean .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end
]]></config>
<event type = "advance" name = "rewardAdvance" event = "script"><![CDATA[
domodlib('VipFuctionss')
domodlib('RewardFuctions')
local levels = {
[20] = {2160, 1},
[40] = {2160, 2},
[60] = {2160, 2},
[80] = {2160, 3},
[100] = {2160, 5}
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL) then
for k, v in pairs(levels) do
if(newLevel == k and getPlayerStorageValue(cid, 100) < k) then
setPlayerStorageValue(cid, 100, k)
doPlayerAddItem(cid, v[1], v[2])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You recive " .. v[2] .. "x " .. getItemNameById(v[1]) .. "(s) for reaching " .. k .. " level.")
end
end
end
if newLevel == 50 then
if (getPlayerReward(cid) == 0) then
doAddVipDays(cid, 30)
doAddReward(cid, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations! You have advanced to level 50 and got 5 days of free vip!')
doBroadcastMessage('Congratulations! ' .. getCreatureName(cid) .. ' Advanced To Level 50 and got 5 days of free vip!')
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Congratulations on reaching 50! Unfortunately, You already have a character over this level and will not receive any days of free vip!')
end
end
return true
end
]]></event>
<event type = "login" name = "rewardLogin" event = "script"><![CDATA[
function onLogin(cid)
registerCreatureEvent(cid, "rewardAdvance")
return true
end
]]></event>
</mod>