Team Spartan Cookies & Milk Forums
Request about net - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: Request about net (/thread-2690.html)



Request about net - Belloxy - 04-05-2018

Hi,
if possible, i want to use the net with IMaterial, but its impossible :
[SF - ERROR] lua/includes/extensions/net.lua:157: net.WriteType: Couldn't write IMaterial (type 21)

So can you add this type to the net ? I really need this


RE: Request about net - Red The Blue Color - 04-05-2018

Why are you trying to net an IMaterial? You can try net.writeType() and net.readType()


RE: Request about net - Belloxy - 04-05-2018

Already tried different net, but it is more easier to add a table with : a id for check the net receive and my material inside
And i have another error when i tried your method only with the material in net.writeType()
[SF - ERROR] addons/starfall/lua/starfall/libraries/libs_sh/net.lua:176: attempt to call local 'Size' (a nil value)


RE: Request about net - Avorius - 04-05-2018

I believe that means that the local 'Size' doesn't exist, or the thing it is trying to be doesn't exist.


RE: Request about net - Red The Blue Color - 05-05-2018

(04-05-2018, 11:40 PM)Avorius Wrote: I believe that means that the local 'Size' doesn't exist, or the thing it is trying to be doesn't exist.

Looks more like an error in the library itself


RE: Request about net - Person8880 - 05-05-2018

It makes no sense to network a material. Server-side Starfall doesn't have the IMaterial type, and even if it did, you'd get the same outcome from networking the path to the material and any parameters provided (if it's a PNG).

If you're trying to network a generated material, that's also not going to work as the material doesn't hold the underlying texture data.