I am creating a swep and there is a function in server that is called in shared. I get a lua error because the function is not included in client and the function will break if placed in shared. How do I fix it/what do I do?
[lua]if SERVER then *code here* end[/lua]
[QUOTE=Baig Flawless;40182814][lua]if SERVER then *code here* end[/lua][/QUOTE]
will that work if the function is being called client side? because I already have the function itself in an if SERVER.
[QUOTE=jack10685;40182933]will that work if the function is being called client side? because I already have the function itself in an if SERVER.[/QUOTE]
If you are running the same code on the client and server and want one part of it to only run on the server that will work, if you are trying to use a function that doesn't exist on the client and you want it to then you will have to remake it on the client.
Sorry, you need to Log In to post a reply to this thread.