Triico 0 Postado Dezembro 22, 2011 Share Postado Dezembro 22, 2011 Olá, Possuo em meu server um script que só deixa um player entrar em tal porta se ele tiver X quantia de REP. Porém, ao abrir a porta, ocorre o seguinte erro na distro e o player entra normalmente na porta: Erro : [Error - Action Interface] data/actions/scripts/rep/rep3.lua:onUse Description: data/actions/scripts/rep/rep3.lua:6: attempt to call global 'getRepPoints' (a nil value) stack traceback: data/actions/scripts/rep/rep3.lua:6: in function (data/actions/scripts/rep/rep3.lua:1 ) E segue também o script: rep3.lua : function onUse(cid, item, frompos, item2, topos) local config = { repNeeded = -5000 } if getRepPoints(cid) <= config.repNeeded then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end else doPlayerSendTextMessage(cid,22,'Stay in front of the door.') return 1 end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) else doPlayerSendTextMessage(cid,22,"Only players with " .. config.repNeeded .. " reputation can open the chest.") end return TRUE end Obrigado! Link para o comentário https://xtibia.com/forum/topic/176042-action-porta-de-rep/ Compartilhar em outros sites More sharing options...
Vinc 101 Postado Dezembro 22, 2011 Share Postado Dezembro 22, 2011 ta falando que seu serve n tem a função 'getRepPoints' Link para o comentário https://xtibia.com/forum/topic/176042-action-porta-de-rep/#findComment-1158769 Compartilhar em outros sites More sharing options...
Triico 0 Postado Dezembro 22, 2011 Autor Share Postado Dezembro 22, 2011 ta falando que seu serve n tem a função 'getRepPoints' Como posso adicionar essa função? :S Link para o comentário https://xtibia.com/forum/topic/176042-action-porta-de-rep/#findComment-1158910 Compartilhar em outros sites More sharing options...
Vinc 101 Postado Dezembro 23, 2011 Share Postado Dezembro 23, 2011 isso depende do script de rep que tu usa se vai te que cria essa função na lib(mais tem que fase ela, n é so por o nome dela(uma ves um cara coloco so o nome e acho que fosse funciona ¬¬)) Link para o comentário https://xtibia.com/forum/topic/176042-action-porta-de-rep/#findComment-1159451 Compartilhar em outros sites More sharing options...
Posts Recomendados