I’m trying to make a door own/lock/unlock addon similar to the one on DarkRP. I have a function in my swep on init.lua as shown here
function getDoorOwner() return "sample text" end
I’m trying to print it to the console so i can later cam.Start3d2d it and show it on doors.
However i get this error when trying to use that function client side.
[ERROR] gamemodes/x/entities/weapons/keys/cl_init.lua:21: attempt to call gl obal 'getDoorOwner' (a nil value) 1. unknown - gamemodes/x/entities/weapons/keys/cl_init.lua:21
Does this happen because the function is defined serverside?