Jump to content

[HELP] SCRIPT HR(HouseRob) Bugged


thegost

Recommended Posts

Stop unnecessary bumping. If nobody is helping, then there's a good reason for it — As far as I can tell, you're very unwilling to cooperate. A solution to your problem won't fall out of a tree. You should cooperate with those who try to help instead of passing on all of the burden onto them. If you were at least semi-competent you'd actually think for a second and maybe share line 89, or at least clearly state which line of your latest code (attached below) is line 89, because as far as I see, it is not the full code and in fact only has 44 lines.

How is anyone meant to find line 89 in a 44-line code? If that extract includes the 'real' line 89, state which line of that extract it is.

function checkHouseForPercentage() 
    checkTimer = nil 
outputChatBox("1") 
    if houserobBlip then 
outputChatBox("2") 
        for i, robber in ipairs (getElementsWithinColShape(houserobCircle, "player")) do 
            if not isPedDead(robber) and robberTeams[getTeamName(getPlayerTeam(robber))] then 
                count = count +1 
                wl = getElementData(robber, "wanted") +1 
                if wl > 36 then wl = 36 
                exports.RPGPolice:setWantedLevel(robber, wl) 
            end 
        end 
    end 
  
        if not firstTime then 
outputChatBox("3") 
            firstTime = 0 
            for i, robber in pairs (getElementsWithinColShape(houserobCircle, "player")) do 
                if not isPedDead(robber) and robberTeams[getTeamName(getPlayerTeam(robber))] then 
                    showProcess(robber) 
            end 
        end 
    end 
     
outputChatBox("4") 
        if count > 0 then 
outputChatBox("5") 
            local percent = getElementData(houserobMarker, "percent") 
            local percent = percent + (count*ppP) 
            if percent > 0 then triggerClientEvent("showHouserobBlip", getRootElement(), 2, houserob[houserobNumber][1],houserob[houserobNumber][2],houserob[houserobNumber][3]) 
  
outputChatBox("7") 
            else 
            if percent > 100 then setElementData(houserobMarker, "percent", 100)    nextStep() else setElementData(houserobMarker, "percent", percent)  
  
outputChatBox("8") 
            end 
        end 
    end 
outputChatBox("Last") 
        checkTimer = setTimer(checkHouseForPercentage, 5000, 1) 
    end 
end 

Not work erro: server.lua:89:attempt to perform arithmedic on a boolean valeu

EDIT: Actually, just post your whole server.lua again - I believe I may know the problem, and its related to the fact you don't even know what you written (or allegedly written) yourself. It's basically the fact you're trying to add 1 to the current wanted level which isn't defined (cause you forgot to steal wanted level scripts)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...