|
Greetings! I am working in Javascript with the Lidgren networking library, but can't get a solid grasp of the different numerical variable types available for my use and the corresponding functions to call to read them from a stream. Here's a couple pages which seem relevant, but which I haven't yet quite been able to make sense of: http://msdn.microsoft.com/en-us/library/system.aspx (See the Structures section). The pages of each of the Structs states that "JScript supports the use of structures, but not the declaration of new ones."... http://msdn.microsoft.com/en-us/library/exx3b86w.aspx This page looks quite promising, but only seems to be useful for C#... http://code.google.com/p/lidgren-network/wiki/MessageCompression This would be perfect, if it included a couple more examples to show how to use it in all cases... I created the following list of functions by browsing the Lidgren assembly in MonoDevelop:
What I need is a list of variable types to declare for different types of numerical data, along with the corresponding function to call in Lidgren to read that type of data once it has been written into a stream. Many thanks! -Aubrey
(comments are locked)
|
|
this question is old, do you have your answer yet? anyway, what i think is javascript only care about int and string i have not tested it though
(comments are locked)
|
|
As of Unity 3.0 most of them are the same, the obvious exceptions being boolean and String instead of bool and string. You can always use the .NET framework types instead for ones that you can't find a javascript compatible version for, e.g. System.Int32 for int, and System.String for string
(comments are locked)
|
