An IP address was written as a number instead of a string.If the variable is local, define it before accessing itĭescription: There is a malformed number in the code (e.g.Make sure the variable is only accessed in the realm it was defined in.You've misspelled the name of the variable.The variable is local and defined later in the code.The variable is defined in a different realm.print( variable.index ) where variable is undefined) 2 + "some string") Attempt to index global 'varname' (a nil value)ĭescription: You tried to index an undefined variable (e.g. Make sure you define local variables before calling them in the codeĪttempt to perform arithmetic on '?' (a type value)ĭescription: You tried to perform arithmetic (+, -, *, /) on a variable that cannot perform arithmetic.You've misspelled the name of the global variable.You tried to use a local variable that was defined later in the code.Check your function calls for spelling errorsĪttempt to perform arithmetic on global '?' (a nil value)ĭescription: You tried to perform arithmetic (+, -, *, /) on a global variable that is not defined.Make sure your function is defined in the correct realm.You've misspelled the name of the function.The function you're calling has an error in it which means it is not defined.You're using a metafunction on the wrong kind of object. ![]() (e.g Calling a function on the client that only exists on the * server.) Your function might be defined in another Lua state.If it's not, it will print your message and halt just like error does.Ĭommon Errors Attempt to call global '?' a nil valueĭescription: You tried to call a function that doesn't exist. assert will check to make sure that something is true.ErrorNoHalt will print the file/line number and your message without halting the script.error will print your message, halt execution, and print the stack.If you want to print your own error messages, there are three functions to do it: Messages which look like errors but are colored differently, such as red or white, are not Lua errors but rather engine errors. If it's menu code, it will be green (not a typical scenario). If it happened clientside, it will be yellow. If the error happens serverside, the text color will be blue. Simplified - If the error is inside a function/chunk of code that is called from somewhere else, it will state where the code is called from. Lastly, the error itself - attempt to call global 'Print' (a nil value)īelow the error, we have the trace of the function. The first line includes the path to the file that is causing the error - addons/my_addon/lua/autorun/server/sv_my_addon_aĪfterwards, the line that's producing the error - sv_my_addon_a:2 (Line 2) That is because Print is not an existing function ( print, however, does exist). unknown - addons/my_addon/lua/autorun/server/sv_my_addon_a:2 lua:2: attempt to call global 'Print' (a nil value)ġ. ![]() Also try making sure Garry's Mod, CSS, or HL2 is up-to-date.Addons/my_addon/lua/autorun/server/sv_my_addon_autorun. Try making sure your harddrive isn't filling up, when HDDs are almost full they run slow. If none of this works its most likely your processor/RAM/or Graphics Card. Steam > Library > Games > Right click on Garry's Mod > Local Files > Delete Local Files > Re-install Gmod Now you need to make a new Gmod icon on your desktop, delete the old one and go back to Steam>Library>Right click Garry's Mod>Create Desktop Shortcut Close Gmod, then open the Steam client>Library>Right click Garry's Mod>Properties>"Set Launch Options" and type this in +mat_dxlevel 95 But it may fix the random crashing problem, it can't hurt to try. This fixes that bug where you press the console key and gmod crashes. ![]() If you want to join any other server scower the forums for the Workshop link. In-Game go to Option>Multiplayer>"When a game server tries to download custom content to your computer" change that to "Do not download any custom files".īut you will see a lot of purple and error signs in server, so you need to find their workshop collection and/or FastDL page. (function())() > Click the arrow to the next page > Paste code in console and hit enter (keep repeating until it says no subscribed items or no workshop items then refresh page and keep pasting and clicking enter)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |