• KOS Zone Errors
    5 replies, posted
I have Eat_My_Hats Jailbreak 7 gamemode and I want to do the KOS zones on my map. He doesnt help me when I send him a message. The weapon is weapon_jb_kosadmin I can put the zone down fine, then when I press R to load it - I get this error [ERROR] gamemodes/jailbreak/entities/weapons/weapon_jb_kosadmin.lua:165: attempt to get length of field 'KOSZones' (a nil value) 1. unknown - gamemodes/jailbreak/entities/weapons/weapon_jb_kosadmin.lua:165 I have no idea what it means. That bit of the code is here // Zone select Slider // local editZone = vgui.Create( "DForm", settingsPanel ) editZone:SetName( "Edit Zone" ) editZone.Modify = editZone:NumSlider(nil, 0, #GAMEMODE.KOSZones, 0 ) editZone.Modify:SetValue( self.ModifyingZone ) editZone.Modify.OnValueChanged = function( s, newVal ) self.ModifyingZone = math.Round( newVal ) end That is line 162 to 169. This line is the error editZone.Modify = editZone:NumSlider(nil, 0, #GAMEMODE.KOSZones, 0 ) Can anyone help - PLEASE?
You'll need to define a GM.KOSZones table somewhere in the gamemode if it doesn't exist currently.
Thanks for replying, code, what exaclty is the GM.KOSZones???? I dont know what it is and so don't know what to add or where to add it
I presume there is a configuration for the gamemode? It was most likely be in there if it already exists.
I have two JB gamemodes, currently. The EXCL one thats free as well as Hats version. I am wanting the KOS zones from Hats JB into the excl one. would you know where the configuration for the GM.KOSZones would be - and would I be able to just... copy it to the same place in the excl one?
You can't just copy code like that - you'd have to extract the entire system and reimplement it into the other gamemode in a more complex way than just copy-and-paste.
Sorry, you need to Log In to post a reply to this thread.