• Help Needed with some Script Error
    10 replies, posted
[B][U]Hi Facepunch ! [/U][/B] So i' m working on my server right now and i made a lot of things. But i' ve a few problem. One of my addon is creating script error. I need help to fix it . [B]So here is the problem : [/B] [IMG]http://cloud-4.steamusercontent.com/ugc/717538489696178661/B97A766A107B12CC574088BD751F70B0E5D1942E/[/IMG] My Weapon Loadout System is creating a script error: [CODE][ERROR] addons/cod_loadout/lua/autorun/client/classmenu.lua:148: bad argument #1 to 'upper' (string expected, got nil) 1. upper - [C]:-1 2. unknown - addons/cod_loadout/lua/autorun/client/classmenu.lua:148 [/CODE] So i' ve been in my "classmenu.lua" . The problem come from line 148. Here it is : [CODE] ClassButton.Paint = function() draw.DrawText(string.upper(v.name), "mw3fontsmall", ClassButton:GetWide() - ScreenScale(24 ), 0, Color(255, 255, 255), TEXT_ALIGN_RIGHT); end[/CODE] Can anyone help me to fix this ? And also. I' m using ULX. Any one know how to disable the MOTD ? Thank you. I hope you could help me. -sorry for my english-
It seems like v.name does not exist so it gets nil when it is expecting there to be a string value in there
What addon is this?
[QUOTE=0V3RR1D3;47534521]It seems like v.name does not exist so it gets nil when it is expecting there to be a string value in there[/QUOTE] So how could i fix it ? Any idea ? Im bad at english -_-
[QUOTE=sifly_04;47534608]So how could i fix it ? Any idea ? Im bad at english -_-[/QUOTE] Well, it doesn't exist. Which means we can't tell you how to fix it unless you find where it is assigned (if it is at all)
Try replacing v with ClassButton
Well. I'm kinda noob with all this stuff. The addon is working well and i dont want to break anything so i'm going to keep this like this until i find something else. Thank you guys for giving me some of you time ;)
[QUOTE=code_gs;47534702]Try replacing v with ClassButton[/QUOTE] Or replace v with self and add self in between the brackets after function.
And then, is there anyone who know how disable the motd from ulx ^^ ?
Delete the file "motdmenu.lua" from ULX. Just do a search to find it.
[QUOTE=r0uge;47537527]Delete the file "motdmenu.lua" from ULX. Just do a search to find it.[/QUOTE] Thank you !
Sorry, you need to Log In to post a reply to this thread.