Jump to content

warning setpedskin


stefutz101

Recommended Posts

WARNING: [DayZ-MTA]/DayZ/survivorSystem.lua_dayz:438: Bad argument @ [ 'destroyElement' [Expected element at argument 1, got boolean] [ [22:51:08]

WARNING: [DayZ-MTA]/DayZ/survivorSystem.lua_dayz:343: Bad argument @ [ 'setPedSkin' [Expected element at argument 1, got number '285']

343:

setPedSkin(getElementData(source,"skin")) 

438

destroyElement(elementWeaponBack[source]) 

For line 343 i can use this ?

setPedSkin(source,getElementData(source,"skin")) 

Help please :3 ! :(

Link to comment

Ty , fixed

How i can repair that ?

First 3 warnings

function findPath (ped) 
    local allwaypoints = getElementsByType ( "pathpoint" ) 
    if #allwaypoints > 2 then 
        if (isElement(getElementData(ped,"controller"))) then 
            triggerClientEvent ( "pedPathfind", getElementData(ped,"controller"), ped) 
        end 
    else 
        setElementData ( ped, "target", nil ) 
        setElementData ( ped, "leader", nil ) 
        assigncontroller(ped) 
        setElementData ( ped, "status", "waiting" )      
    end 
end 
  
--ped picks the path node to start with 
addEvent( "pedPathChoose", true )    

last 2 warnings

local slothbot = createPed (tonumber(skin),tonumber(x),tonumber(y),tonumber(z))--spawns the ped 
    if (slothbot ~= false) then 
        triggerEvent ( "onBotSpawned", slothbot )        
        setTimer ( setElementData, 200, 1, slothbot, "slothbot", true ) -- makes it a bot 
        setTimer ( setElementData, 200, 1, slothbot, "AllowFire", true ) -- makes it able to shoot when it wants 
        setTimer ( assigncontroller, 300, 1, slothbot ) --sets the bots controller 
        setTimer ( giveWeapon, 800, 1, slothbot, tonumber(weapon), 99999, true ) --gives the weapon------------------------------------------------------------------------------------------ 
        setElementData(slothbot, "BotWeapon", tonumber(weapon)) 
        if team ~= nil then 
            setElementData(slothbot, "BotTeam", team) 
        end 
        setTimer ( setElementInterior, 100, 1, slothbot, tonumber(interior)) --sets interior 
        setTimer ( setElementDimension, 100, 1, slothbot, tonumber(dimension)) --sets dimension 
         

http://iceimg.net/images/2015/08/25/mta ... -58-33.png

Please help , or is someone what know a fixed slothbot ? With not many errors ?

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...