PKPK Posted November 13, 2024 Share Posted November 13, 2024 --This is the function we'll call remotely to do it's thing, in this case make you giant! local function GrowGiant(player, size) local valid_grow_state = true -- todo: make sure the player is allowed to grow right now if valid_grow_state then player.Transform:SetScale(size,size,size) end end --This adds the handler, which means that if the server gets told "GrowGiant", -- it will call our function, GrowGiant, above AddModRPCHandler("GrowGiantRPC", "GrowGiant", GrowGiant) --This has it send the RPC to the server when you press "v" local size = 1 local function SendGrowGiantRPC() size = size + 1 if size == 6 then size = 1 end SendModRPCToServer(GetModRPC("GrowGiantRPC", "GrowGiant"), size) end GLOBAL.TheInput:AddKeyDownHandler(GLOBAL.KEY_V, SendGrowGiantRPC) I set the above example code to client mode, deployed a dedicated server, and pressed V. Instead of increasing the character size, the server console throws an error Error decoding lua RPC mod namespace I need to build in server mode to use RPC...? Link to comment https://forums.kleientertainment.com/forums/topic/160648-error-decoding-lua-rpc-mod-namespace/ Share on other sites More sharing options...
PKPK Posted November 13, 2024 Author Share Posted November 13, 2024 Solved. edit modinfo.lua all_clients_require_mod = true client_only_mod = false Link to comment https://forums.kleientertainment.com/forums/topic/160648-error-decoding-lua-rpc-mod-namespace/#findComment-1756980 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now