NWStrings/Ints Alternative
Hi, my script has been refused because i use NWStrings/Ints, but lot of script on SF use this functions. But ok, what alternative i can use for replace this functions ? Thanks.
There's nothing wrong with using the NW functions, but the question is if you have used them wrongly. It's really hard to tell what you should be doing unless you can provide a snippet of the code, think that's possible? Feel free to message me in the case you don't want anyone else to see the code.
Also, if you haven't already take a look at the net library. That's what you should be using for general networking between server and client that doesn't have to do with entities.
I use network in a init.lua of NPC for open a menu. I use network on a NPC to get his name (name of npc) But i think is that : I use network in clientside (Button in my menu) for SetNWString and SetNWInt Thank for your response, and sorry for my english :)
https://github.com/Mista-Tea/netwrapper
chances are there is some design flaw with how you use net - not that you use net, maybe an exploit or critical in-efficiency
Scripts that use NW functions for networking are, for a majority, old scripts on the marketplace, when Scriptfodder was less rigorous to have a script available. NW functions are cheap lazy ways for what I know, because when you use these type of functions, the information is sent on all clients directly. So, the best way is to use a proper networking: net.Start, net.Receive etc., because they properly send and receive things when you do a certain action, not when you play the game and unnecessary informations for a 33rd client are sent to you if you will not use them. I know that this seems be a bit strange to use nets and others with 100 more lines instead of using NW (more easier to use this function), but this will provide a better optimization for the server and the client, for what I know. Good luck with your script!
Wrong section, moved.
Bydrizzy.vipat 18th of December 2016 01:23:46
chances are there is some design flaw withhowyou use net - notthatyou use net, maybe an exploit or critical in-efficiency
nwvars are shite. robotboy said he 'updated' them but Ley quickly verified that not much has changed in terms of efficiency.
Use net lib.
NWVars are fine in some cases - we'll only deny it if you're completely over/mis-using them. The majority of the time you can use the net library instead for a much better end result.
ByHandsome Matt ๐ปat 20th of December 2016 13:45:49
NWVars are fine in some cases - we'll only deny it if you're completely over/mis-using them. The majority of the time you can use the net library instead for a much better end result.
The only thing I would see nwvars being good is when you have variable that updates each frame.
What's wrong with data tables? They provide the same functionality as NWVars and are a lot more efficient.
Data tables are cool, iirc Nookyava doesn't like Data Tables though :c