• Which files to AddCSLuaFile and which to include?
    5 replies, posted
Right now, my understanding is you init.lua: [QUOTE]AddCSLuaFile( cl_file, sh_file ) include( sv_file, sh_file )[/QUOTE] and on cl_init: [QUOTE]include( cl_file, sh_file )[/QUOTE] Is there anything i have added/included that's not necessary or am I missing anything? This is a dumb question but i just need someone to clear it up for me. Thanks
You do need to write like that : [CODE]AddCSLuaFile('cl_file.lua') AddCSLuaFile('sh_file.lua')[/CODE] ... for each added file
[QUOTE=infrarouge;49673605]You do need to write like that : [CODE]AddCSLuaFile('cl_file.lua') AddCSLuaFile('sh_file.lua')[/CODE] ... for each added file[/QUOTE] I know that, i was just writing this quickly. I'm not asking what the proper syntax is for it, i'm asking what files to use it on.
[QUOTE=Austin1346;49673666]I know that, i was just writing this quickly. I'm not asking what the proper syntax is for it, i'm asking what files to use it on.[/QUOTE] No I do not think you can do that sorry
Well you need to understand what they mean. AddCSLuaFile makes the file available to the client. That means that whatever function is in that file can be used by the client, and the information in there can be read as well. Look at the wiki to see which functions are fully orange ( client side only ) and if you're using one of those in the file, congrats you have your first parameter to give to the client. However it doesn't just have to be for clientside only functions. You can use shared fIles to create a library for retrieving information. Usually I make a library of functions to retrieve NWVars instead of having to remember what I named each one.
[QUOTE=infrarouge;49673736]No I do not think you can do that sorry[/QUOTE] Yes you heard the man, you are not allowed to ask what files to use those functions on.
Sorry, you need to Log In to post a reply to this thread.