• F4 Menu Not Showing Up
    12 replies, posted
Whenever my users or I open up my F4 menu, I get this error: [ERROR] addons/carbonmenu/lua/darkrp_modules/carbonmenu/cl_core.lua:270: attempt to index local 'modelView' (a nil value) 1. OpenCarbon - addons/carbonmenu/lua/darkrp_modules/carbonmenu/cl_core.lua:270 2. fn - addons/carbonmenu/lua/darkrp_modules/carbonmenu/cl_core.lua:1556 3. unknown - addons/ulib/lua/ulib/shared/hook.lua:179 Here's what I have on line 270 of cl_core.lua for my F4 menu. modelView:SetSize(modelPanel:GetWide(), modelPanel:GetTall()) Line 1556 of cl_core.lua: OpenCarbon() And for ulib hook.lua line 179: a, b, c, d, e, f = v.fn( ... ) Please help me!
What is modelView defined as?
[QUOTE=code_gs;48012060]What is modelView defined as?[/QUOTE] I'm sorry, I'm a bit of a noob to lua, but if you mean what's it supposed to do, it's basically supposed to show the player model of the job before a player becomes it.
I'm asking what modelView is. There error is saying it doesn't exist. Is there anywhere in the code it says "modelView ="?
Yes, here is what has modelView: [url]http://i.gyazo.com/d4beae99cefd4fe97fd167125a78be9a.png[/url] Those are all the modelView's found in cl_core.lua
Seems they made a typo. Change AModelPanel to DModelPanel.
Thanks, DModelPanel worked, but when users go onto the jobs tab, this error pops up: [ERROR] addons/carbonmenu/lua/darkrp_modules/carbonmenu/cl_core.lua:698: attempt to index local 'icon' (a nil value) 1. AddJob - addons/carbonmenu/lua/darkrp_modules/carbonmenu/cl_core.lua:698 2. OpenJobs - addons/carbonmenu/lua/darkrp_modules/carbonmenu/cl_core.lua:897 3. DoClick - addons/carbonmenu/lua/darkrp_modules/carbonmenu/cl_core.lua:1367 4. unknown - lua/vgui/dlabel.lua:218 Line 698: icon:SetPos( jobc:GetWide() - 148, 10 ) Line 897: AddJob( job ) Line 1367: OpenJobs()
What is icon defined as?
I think I found the problem, I didn't have icon16/star.png in my server material folder, I added it, also I found 2 other instances of DModelPanel, should I change them to AModelPanel or BModelPanel, CModelPanel?
D stands for derma. There is no A, B, or C VGUI elements. Everything should be DWhatever.
Thanks! My jobs and shop tabs work, but the playermodel previews are zoomed in up to close, but I don't really want to make you work anymore, but in general thank you so much for the help!! :D
Play with the SetCamPos and SetFOV values.
SetFOV didn't have to do anything with the job preview, but I think SetCamPos does, do you think this is too zoomed? icon:SetCamPos(Vector(20, 00, 65)) and icon:SetCamPos(Vector(30, 10, 75))
Sorry, you need to Log In to post a reply to this thread.