Postado Julho 20, 2014 10 anos Olá, Estou com um erro meio chato mais creio que é Fácil de Resolve (Já era para ter removido) mais estou com uns Problemas Maiores o erro é o seguinte: No Meu servidor não tem as source então eu adicionei umas script que ao da Look na porta de qualquer house a mensagem inglês ia ficar em português, Funcionou mais só que quando dou Look na porta diz o ID do player que é dono da House e não o Nome do Player http://prntscr.com/44i5v2 script: function onLook(cid, thing, position, lookDistance) if not isCreature(thing.uid) then local house = getHouseFromPos(position) if house then local article = thing.type > 1 and thing.type.." " or getItemArticleById(thing.itemid)..(getItemArticleById(thing.itemid) == "" and "" or " ") local plural = getItemPluralNameById(thing.itemid) == "" and getItemNameById(thing.itemid).."s" or getItemPluralNameById(thing.itemid) local desc = getItemSpecialDescription(thing.uid) == "" and "" or getItemSpecialDescription(thing.uid).." " local str = "You see "..(article)..""..(thing.type > 1 and plural or getItemNameById(thing.itemid))..". "..desc..".\nPertence à casa '"..getHouseName(house).."'." if getHouseOwner(house) ~= 0 then str = str.." "..getHouseOwner(house).." é dono dessa casa." else str = str.." Ninguém é dono dessa casa. Ela custa "..getHousePrice(house).." dólares." end if getPlayerAccess(cid) > 2 then str = str.."\nItemID: ["..(thing.itemid).."]" if thing.actionid > 0 then str = str..", ActionID: ["..(thing.actionid).."]" end if thing.uid < 65536 then str = str..", UniqueID: ["..(thing.uid).."]" end str = str..".\nPosition: [X: "..(getThingPos(thing.uid).x).."] [Y: "..(getThingPos(thing.uid).y).."] [Z: "..(getThingPos(thing.uid).z).."]." end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return false end end return true end Esperando Resposta
Postado Julho 20, 2014 10 anos function onLook(cid, thing, position, lookDistance) if not isCreature(thing.uid) then local house = getHouseFromPos(position) if house then local article = thing.type > 1 and thing.type.." " or getItemArticle(thing.itemid)..(getItemArticle(thing.item) == "" and "" or " ") local plural = getItemPluralName(thing.itemid) == "" and getItemName(thing.item).."s" or getItemPluralName(thing.item) local desc = getItemSpecialDescription(thing.uid) == "" and "" or getItemSpecialDescription(thing.uid).." " local str = "You see "..(article)..""..(thing.type > 1 and plural or getItemName(thing.item))..". "..desc..".\nPertence à casa '"..getHouseName(house).."'." if getHouseOwner(house) ~= 0 then str = str.." "..getHouseOwner(house).." é dono dessa casa." else str = str.." Ninguém é dono dessa casa. Ela custa "..getHousePrice(house).." dólares." end if getPlayerAccess(cid) > 2 then str = str.."\nItemID: ["..(thing.itemid).."]" if thing.actionid > 0 then str = str..", ActionID: ["..(thing.actionid).."]" end if thing.uid < 65536 then str = str..", UniqueID: ["..(thing.uid).."]" end str = str..".\nPosition: [X: "..(getThingPos(thing.uid).x).."] [Y: "..(getThingPos(thing.uid).y).."] [Z: "..(getThingPos(thing.uid).z).."]." end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return false end end return true end Tenta ai
Postado Julho 20, 2014 10 anos Autor quando dou look não apareçe nada e dar esse erro *--* [20/07/2014 11:42:41] [Error - CreatureScript Interface] [20/07/2014 11:42:41] data/creaturescripts/scripts/house_translation.lua:onLook [20/07/2014 11:42:41] Description: [20/07/2014 11:42:41] (luaGetThing) Thing not found [20/07/2014 11:42:41] [Error - CreatureScript Interface] [20/07/2014 11:42:41] data/creaturescripts/scripts/house_translation.lua:onLook [20/07/2014 11:42:41] Description: [20/07/2014 11:42:41] data/lib/050-function.lua:247: attempt to index a boolean value [20/07/2014 11:42:41] stack traceback: [20/07/2014 11:42:41] data/lib/050-function.lua:247: in function 'getItemArticle' [20/07/2014 11:42:41] data/creaturescripts/scripts/house_translation.lua:5: in function <data/creaturescripts/scripts/house_translation.lua:1>
Postado Julho 20, 2014 10 anos function onLook(cid, thing, position, lookDistance) if not isCreature(thing.uid) then local house = getHouseFromPos(position) if house then local article = thing.type > 1 and thing.type.." " or getItemArticleById(thing.itemid)..(getItemArticleById(thing.itemid) == "" and "" or " ") local plural = getItemPluralNameById(thing.itemid) == "" and getItemNameById(thing.itemid).."s" or getItemPluralNameById(thing.itemid) local desc = getItemSpecialDescription(thing.uid) == "" and "" or getItemSpecialDescription(thing.uid).." " local str = "You see "..(article)..""..(thing.type > 1 and plural or getItemNameByName(thing.itemid))..". "..desc..".\nPertence à casa '"..getHouseName(house).."'." if getHouseOwner(house) ~= 0 then str = str.." "..getHouseOwner(house).." é dono dessa casa." else str = str.." Ninguém é dono dessa casa. Ela custa "..getHousePrice(house).." dólares." end if getPlayerAccess(cid) > 2 then str = str.."\nItemID: ["..(thing.itemid).."]" if thing.actionid > 0 then str = str..", ActionID: ["..(thing.actionid).."]" end if thing.uid < 65536 then str = str..", UniqueID: ["..(thing.uid).."]" end str = str..".\nPosition: [X: "..(getThingPos(thing.uid).x).."] [Y: "..(getThingPos(thing.uid).y).."] [Z: "..(getThingPos(thing.uid).z).."]." end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return false end end return true end A peça chave ta entre getItemNameByID tem que colocoa byname
Postado Julho 21, 2014 10 anos Autor Deu só esse erro ai *--* [21/07/2014 08:17:01] [Error - CreatureScript Interface] [21/07/2014 08:17:01] data/creaturescripts/scripts/house_translation.lua:onLook [21/07/2014 08:17:01] Description: [21/07/2014 08:17:01] data/creaturescripts/scripts/house_translation.lua:8: attempt to call global 'getItemNameByName' (a nil value) [21/07/2014 08:17:01] stack traceback: [21/07/2014 08:17:01] data/creaturescripts/scripts/house_translation.lua:8: in function <data/creaturescripts/scripts/house_translation.lua:1> tentei da uma modificada tbm mais mesmo erro Editado Julho 22, 2014 10 anos por AnnaFeeh (veja o histórico de edições)
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.