• Horror Error on my DarkRP Server
    2 replies, posted
Hello i have a new Error Write me who can i fix GAMEMODE.Net [CODE][ERROR] gamemodes/darkrp/entities/weapons/weapon_ticket_giver.lua:65: attempt to index global 'GM' (a nil value) 1. fnEnter - gamemodes/darkrp/entities/weapons/weapon_ticket_giver.lua:65 2. OnEnter - lua/derma/derma_utils.lua:219 3. unknown - lua/vgui/dtextentry.lua:77 [/CODE] And this here [CODE] [ERROR] gamemodes/darkrp/entities/weapons/weapon_ticket_giver.lua:65: attempt to call method 'RequestTicketPlayer' (a nil value) 1. fnEnter - gamemodes/darkrp/entities/weapons/weapon_ticket_giver.lua:65 2. OnEnter - lua/derma/derma_utils.lua:219 3. unknown - lua/vgui/dtextentry.lua:77 [/CODE] code line [CODE] Derma_StringRequest( "Ticket Reason?", "What is the reason for this ticket for "..name.."?", "", function( strReason ) if not IsValid( target ) then return end if not target:IsPlayer() then GAMEMODE:RequestTicketCar( target, strReason, price ) else GAMEMODE:RequestTicketPlayer( target, strReason, price ) end end )[/CODE] [highlight](User was banned for this post ("Wrong section" - Novangel))[/highlight]
Try [code]Derma_StringRequest( "Ticket Reason?", "What is the reason for this ticket for "..name.."?", "", function( strReason ) if not IsValid( target ) then return end GAMEMODE = gmod.GetGamemode() if not target:IsPlayer() then GAMEMODE:RequestTicketCar( target, strReason, price ) else GAMEMODE:RequestTicketPlayer( target, strReason, price ) end end )[/code]
Ok next Erros thanks for Helping The Code Line local job = GAMEMODE.Jobs:GetPlayerJob( pl ) local license_id = GAMEMODE.Player:GetSharedGameVar( pl, "driver_license", "None" ) local nameFirst = GAMEMODE.Player:GetSharedGameVar( pl, "name_first", pl:RealNick() ) local nameLast = GAMEMODE.Player:GetSharedGameVar( pl, "name_last", "" ) local gender = GAMEMODE.Player:GetSharedGameVar( pl, "char_sex", 0 ) -- gender = gender == 0 and "Male" or "Female" -- job = job and job.Name or "Unknown" license_id = license_id ~= "" and license_id or "None" -- The Error -- [ERROR] gamemodes/darkrp/entities/weapons/weapon_idcard.lua:179: attempt to index field 'Jobs' (a nil value) 1. drawIDInfo - gamemodes/darkrp/entities/weapons/weapon_idcard.lua:179 2. unknown - gamemodes/darkrp/entities/weapons/weapon_idcard.lua:260
Sorry, you need to Log In to post a reply to this thread.