util.AddNetworkString Not properly pooling the net message
6 replies, posted
Here is my code:
server:
util.AddNetworkString( "FRRP_SaveData" )
function plydata:SaveData()
--This is filled, but I'm not revealing my code.
end
net.Receive( "FRRP_SaveData", function( len, ply )
ply:SaveData()
end )
client:
function SaveData()
net.Start( "FRRP_SaveData" )
net.SendToServer()
end
I get this error when I run the SaveData() function:
[ERROR] gamemodes/firstrespondersrp/gamemode/modules/functions/cl_functions.lua:96: Calling net.Start with unpooled message name! [ http://goo.gl/qcx0y ]
1. Start - [C]:-1
2. SaveData - gamemodes/firstrespondersrp/gamemode/modules/functions/cl_functions.lua:96 -- The SaveData() function
3. DoClick - gamemodes/firstrespondersrp/gamemode/modules/vgui/cl_charactermenu.lua:214 -- What's running the function
4. unknown - lua/vgui/dlabel.lua:232
I can't for the life of me figure out why it's not working. I literally copied and pasted the message name and it still won't work. I restarted the server and changed the level, still nothing.
Make sure the serverside code is running at all, and doesn't have any syntax errors.
All the other net messages work just fine. It is only that one.
Wait, so you have a function clientside, and that function starts a net, sends it to the server, and with that the server tries to start the function thats clientside, which does the whole thing again?
I only see this code, so its all i can go for.
Why do you try to start a function thats clientside, but try to start it serverside?
Isnt that doing a infinite loop? (if starting a clientside function from the server would even work)
I created a clientside and serverside function, I want the clientside function to trigger the serverside function. They are two separately defined functions. It does not create a loop. It would be impossible to loop that at its current state as a serverside code would not trigger a clientside function.
Thats what i mean. But you dont show us enough code...i only saw the clientside function, and then the server trying to start a function with the same name.
Solved --
FileZilla I guess was taking a shit and didn't save my files properly.
Sorry, you need to Log In to post a reply to this thread.