Postado Dezembro 17, 2021 3 anos 1 hora atrás, HomeJobs disse: local item_id,amount = 7721,1 function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if (isPlayer(cid) == TRUE) then if (getPlayerItemCount(cid,item_id,amount) then if not(getPlayerBlessing(cid, bless[i]) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end end end end return TRUE end [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua) data/creaturescripts/scripts/percentbless.lua:5: ')' expected near 'then'
Postado Dezembro 17, 2021 3 anos Administrador 9 minutos atrás, Apache disse: [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua) data/creaturescripts/scripts/percentbless.lua:5: ')' expected near 'then' function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if (isPlayer(cid) == TRUE) then if (getPlayerItemCount(cid,item_id,amount) || not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50) end end return true end Editado Dezembro 18, 2021 3 anos por HomeJobs (veja o histórico de edições) Contato : https://www.linkedin.com/in/rafhael-oliveira/ Servidores : https://www.pokemmorpg.com Projetos : https://github.com/thetibiaking
Postado Dezembro 18, 2021 3 anos 45 minutos atrás, HomeJobs disse: function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if (isPlayer(cid) == TRUE) then if (getPlayerItemCount(cid,item_id,amount) || not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50) end end return true end [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua) data/creaturescripts/scripts/percentbless.lua:5: ')' expected near '|' Spoiler function onSay(cid, words, param) if(not checkExhausted(cid, 666, 5)) then return true end if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then doPlayerSendCancel(cid,'You have already got one or more blessings!') else if doPlayerRemoveMoney(cid, 50000) == TRUE then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doSendMagicEffect(getPlayerPosition(cid), 49) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!') else doPlayerSendCancel(cid, "You need 50.000 gold coins to get blessed!") end end ret Editado Dezembro 18, 2021 3 anos por Apache (veja o histórico de edições)
Postado Dezembro 18, 2021 3 anos Administrador 30 minutos atrás, Apache disse: [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua) data/creaturescripts/scripts/percentbless.lua:5: ')' expected near '|' Ocultar conteúdo function onSay(cid, words, param) if(not checkExhausted(cid, 666, 5)) then return true end if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then doPlayerSendCancel(cid,'You have already got one or more blessings!') else if doPlayerRemoveMoney(cid, 50000) == TRUE then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doSendMagicEffect(getPlayerPosition(cid), 49) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!') else doPlayerSendCancel(cid, "You need 50.000 gold coins to get blessed!") end end ret Foi mal confundi as linguagens lua nao usa pipe function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if (isPlayer(cid) == TRUE) then if (getPlayerItemCount(cid,item_id,amount) and not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50) end end return true end Contato : https://www.linkedin.com/in/rafhael-oliveira/ Servidores : https://www.pokemmorpg.com Projetos : https://github.com/thetibiaking
Postado Dezembro 18, 2021 3 anos 26 minutos atrás, HomeJobs disse: Foi mal confundi as linguagens lua nao usa pipe function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if (isPlayer(cid) == TRUE) then if (getPlayerItemCount(cid,item_id,amount) and not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50) end end return true end [Error - LuaInterface::loadFile] data/creaturescripts/scripts/percentbless.lua:5: ']' expected near ',' [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua) data/creaturescripts/scripts/percentbless.lua:5: ']' expected near ','
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.