Hello I recently took this script from somewhere I forgot but I edited the level and monsters and it has an error
I have no idea what that symbol beans
action.xml
lua
Code:
[Error - LuaScriptInterface::loadFile] data/actions/scripts/fishing.lua:3: unexpected symbol near 'á'
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/fishing.lua)
data/actions/scripts/fishing.lua:3: unexpected symbol near 'á'
action.xml
Code:
<action itemid="10223" event="script" value="fishing.lua" allowfaruse="1"/>
lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625},
rateSkill = getConfigValue("rateSkill"),
allowFromPz = false,
useWorms = false
}
local monsters = {"L1 Prompt", "L2 Cache", "L3 Demon", "GGRD4", "GGRD5", "RGB", "Asus", "Tanktoa", "Cu Bu"}
if(not isInArray(config.waterIds, itemEx.itemid)) then
return false
end
if((config.allowFromPz or not getTileInfo(getCreaturePosition(cid)).protection) and itemEx.itemid ~= 493 and math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) < getPlayerSkill(cid, SKILL_FISHING) and (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1)))) then
if getPlayerLevel(cid) >= 500 and getPlayerSkillLevel(cid, SKILL_FISHING) >= 100 then
randsummon = math.random(0,9)
elseif getPlayerLevel(cid) >= 400 then
randsummon = math.random(0,8)
elseif getPlayerLevel(cid) >= 200 then
randsummon = math.random(0,6)
elseif getPlayerLevel(cid) >= 100 then
randsummon = math.random(0,4)
elseif getPlayerLevel(cid) >= 50 then
randsummon = math.random(0,2)
else
doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
end
if randsummon == 0 then
doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
else
doSummonMonster(monsters[randsummon], getCreaturePosition(cid))
doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
end
end
doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
return true
end