Big Smoker Posted July 2, 2017 Share Posted July 2, 2017 Boa Tarde pessoal preciso de ajuda nessa função if getPlayerCurrentSlots() + getItemSlots(itemName) <= getPlayerMaxAviableSlots() then -- AVISO AQUI! local col = getElementData(getLocalPlayer(),"currentCol") if #getElementsWithinColShape(col,"player") > 1 or getNetworkStats().packetlossLastSecond > 1 then return end x,y,z = getElementPosition(getLocalPlayer()) if pcount ~= nil and pcount < getTickCount() then pcount = getTickCount() + 2000 x,y,z = getElementPosition(getLocalPlayer()) outputChatBox("Wait... Press '" ..tostring(key).. "' (you must not move!)",255,255,255) return false elseif pcount == nil then pcount = getTickCount() + 2000 x,y,z = getElementPosition(getLocalPlayer()) return false end local x1,y1,z1 = getElementPosition(getLocalPlayer()) if x1 ~= x or y1 ~= y or z1 ~= z then pcount = nil return false end pcount = nil triggerServerEvent("onPlayerTakeItemFromGround", getLocalPlayer(), itemName, col) setElementData(getLocalPlayer(),"loot",false) setElementData(getLocalPlayer(),"currentCol",false) disableMenu() else startRollMessage2("Inventory","Inventory is full!",255,0,0) end end O AVISO NA LINHA 1: attempt to perform arithmetic on a boollean value Obrigado desde de já Link to comment
Other Languages Moderators Lord Henry Posted July 2, 2017 Other Languages Moderators Share Posted July 2, 2017 Você não deve somar funções pois elas podem retornar false, o aviso está dizendo que ele não conseguiu fazer um cálculo com valor booleano (false). Link to comment
Big Smoker Posted July 6, 2017 Author Share Posted July 6, 2017 o que devo fazer para corrigir-lo? Link to comment
DNL291 Posted July 9, 2017 Share Posted July 9, 2017 Desculpe ter que falar isso, mas o que deve fazer pra corrigir? O óbvio: veja qual funcão retorna o valor booleano e o por quê. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now