Community Forum

Network callbacks mistake

Forum Overview >> Scripting

CategoryScripting
Created04.01.2017 01:19


Tykonket (Unknown) 04.01.2017 01:22
Are "readStream", "writeStream", "readUpdateStream" and "writeUpdateStream" called only on specializations?
I have a simple script added by modDesc, I tried to implement them but they aren't called...
Help please

Tykonket (Unknown) 04.01.2017 02:16
One solution I foud is:

if g_server ~= nil then
--On the server
g_server:registerObject(myScriptObject, false)
else
--On the client
g_client:registerObject(myScriptObject, false)
end

maybe after all the code in loadMap and then after deleteMap code

if g_server ~= nil then
--On the server
g_server:unregisterObject(myScriptObject)
else
--On the client
g_client:unregisterObject(myScriptObject)
end

but I'm not sure this is right, I need help!! :)


Note: Log in to post. Create a new account here.