• cl_init.lua not found (nowhere)
    2 replies, posted
People on my gamemode seem to get this error when joining. cl_init.lua just... doesn't load. The weird part is there is no errors, if I add a ; or a space or ANYTHING and then save cl_init.lua it randomly gets loaded for them.
You're calling the file before it exists. Make sure that it's not done outside of the gamemode.
AddCSLuaFile must be called prior to the include; additionally the file must contain at least 1 character... I recommend setting up your 3 file system in such a way that all of your includes / AddCSLuaFile calls are handled in one file ( shared or sh_init.lua )... I have an example which also includes a helper-function to include files for you. You just use the enumeration from the top of the file for the realm the file needs to be loaded into... Example without the function: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/loading_files_across_realms.lua.html[/url] 3 different styles of the same function ( last 2 examples don't repeat code ): [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/loading_files_across_realms_simple.lua.html[/url] And what it looks like: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/includes/cl_init.lua[/url] [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/includes/init.lua[/url] [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/includes/sh_init.lua[/url] OR shared [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/includes/shared.lua[/url] All includes ( uncommented ) listed can be viewed too: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/includes/hud/cl_hud.lua[/url] [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/includes/sh_player.lua[/url] [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/includes/gm_createteams.lua[/url]
Sorry, you need to Log In to post a reply to this thread.