• Lua error fixing/editing script
    3 replies, posted
What is wrong with this section and how can it be fixed - im .lua noob and have exhausted my limited knowledge of lua to solve the problem - i need you help! [CODE]function GM:Think() for _, ply in pairs( player.GetAll() ) do if ply:IsValid() then ply:StaminaCheck() ply:CheckHunger() if ply:GetNWBool( "ishigh" ) then if ply:GetVelocity():Length() > 0 then ply:SetVelocity( Vector( math.random( -50, 50 ), math.random( -50, 50 ), 0 ) ) end end if ply.NextO2Think == nil then ply.NextO2Think = 0 end if CurTime() > ply.NextO2Think then if !ply:Alive() then return end if !ply.O2 then if ply:WaterLevel() > 0 then ply:TakeDamage( 5, ply, ply ) end end ply.NextO2Think = CurTime() + 1 end end end[/CODE] [highlight](User was banned for this post ("Wrong section" - mahalis))[/highlight]
You missing an 'end' at under the last line.
I m having issues with added weapons like the nuke launcher from the official nuke pack and any air strikes it just shoots the rocket/bomb and it dies it doesn't shoot off and the only way to detonate it is by manually pressing the use key on it and same with smoke grenades ect from the realistic CSS weapons it throws nothing and i don't know whats wrong plus i downloaded the PMC npcs i think it was with all the SAS SWAT ect npcs and when i spawn them it gives me any error sign how do i fix this when i downloaded it i did all the things you're supposed to do add materials ect [highlight](User was banned for this post ("Thread derailing (this post belongs in Help & Support not whatever random thread you first click on)" - mahalis))[/highlight]
[QUOTE=Fang_shadow;20014827]I m having issues with added weapons like the nuke launcher from the official nuke pack and any air strikes it just shoots the rocket/bomb and it dies it doesn't shoot off and the only way to detonate it is by manually pressing the use key on it and same with smoke grenades ect from the realistic CSS weapons it throws nothing and i don't know whats wrong plus i downloaded the PMC npcs i think it was with all the SAS SWAT ect npcs and when i spawn them it gives me any error sign how do i fix this when i downloaded it i did all the things you're supposed to do add materials ect[/QUOTE] Good to know
Sorry, you need to Log In to post a reply to this thread.