• Elevator: Source slot machines
    0 replies, posted
I've seen one or two thread about them but they weren't helpful at all. Basically I'm trying to make the slot machines work but they seem to be conflicting with ULX (they work then ulx admin mod is removed). Here is the error: [CODE] [ERROR] gamemodes/cinema/entities/entities/slotmachine/init.lua:238: attempt to index local 'ply' (a nil value) 1. SendPlaying - gamemodes/cinema/entities/entities/slotmachine/init.lua:238 2. unknown - gamemodes/cinema/entities/entities/slotmachine/init.lua:179 [/CODE] Here are the lines at which the errors are occuring : [CODE] /*--------------------------------------------------------- Slot Machine Functions ---------------------------------------------------------*/ function ENT:GetPlayer() local ply = player.GetByID( self.SlotsPlaying ) if IsValid(ply) && ply:IsPlayer() && self:IsInUse() then return ply end end function ENT:SendPlaying() if ( !IsValid( self ) || !IsValid(self.chair) ) then return end self.SlotsPlaying = self.chair:GetDriver():EntIndex() self.LastSpin = CurTime() local ply = self:GetPlayer() ply.SlotMachine = self -- 238 is here ------------- local rf = RecipientFilter() rf:AddPlayer( ply ) umsg.Start("slotsPlaying", rf) umsg.Short( self:EntIndex() ) umsg.End() end [/CODE] and [CODE] function ENT:Use( ply ) if !IsValid(ply) || !ply:IsPlayer() then return end if !self:IsInUse() then self:SetupVehicle() if !IsValid(self.chair) then return end -- just making sure... ply.SeatEnt = self.chair ply.EntryPoint = ply:GetPos() ply.EntryAngles = ply:EyeAngles() ply:EnterVehicle( self.chair ) self:SendPlaying( ply ) - 179 is here -------------- else return end end [/CODE] Anyone knows if ulx sometimes conflicts with anything in these codes? Thank you.
Sorry, you need to Log In to post a reply to this thread.