[Intermediate]Server basics

01/05/2010 17:16 Nullable#16
Quote:
Originally Posted by Kiyono View Post
So you got the packet from Korvac's wiki which said "ushort" but how did you know that you had to use "uint16" cause I looked at that wiki before but I had no clue on how to figure out what you needed and I still don't know why you used "uint16" is there a chart for stuff like that or did you just learn it somewhere?
you can google integer types, ushort is uint16 and uint32 is uint int16 is short and int32 is int :}
01/05/2010 17:19 IAmHawtness#17
Quote:
Originally Posted by Kiyono View Post
So you got the packet from Korvac's wiki which said "ushort" but how did you know that you had to use "uint16" cause I looked at that wiki before but I had no clue on how to figure out what you needed and I still don't know why you used "uint16" is there a chart for stuff like that or did you just learn it somewhere?
It's pretty easy, actually.
byte = 1 byte, obviously
short = 2 bytes
int = 4 bytes
long = 8 bytes

The size of the packet is determined in the first two bytes, hence the "(ushort)Length", and it works like that for all the parameters in a packet.
01/05/2010 17:30 Arcо#18
Great job Nullable.
This is a great guide.
01/05/2010 18:18 Kiyono#19
Well I managed to google it and ended up with this table: [Only registered and activated users can see links. Click Here To Register...], I just need to take the time to learn it.

//edit I put the table here for quick reference.

Built-In Types Table (C# Reference)
C# Type.NET Framework Type
boolSystem.Boolean
byteSystem.Byte
sbyteSystem.SByte
charSystem.Char
decimalSystem.Decimal
doubleSystem.Double
floatSystem.Single
intSystem.Int32
uintSystem.UInt32
longSystem.Int64
ulongSystem.UInt64
objectSystem.Object
shortSystem.Int16
ushortSystem.UInt16
stringSystem.String

//edit Should put this here too.

byte = 1 byte
short = 2 bytes
int = 4 bytes
long = 8 bytes
01/05/2010 23:43 Korvacs#20
Quote:
Originally Posted by Kiyono View Post
So you got the packet from Korvac's wiki which said "ushort" but how did you know that you had to use "uint16" cause I looked at that wiki before but I had no clue on how to figure out what you needed and I still don't know why you used "uint16" is there a chart for stuff like that or did you just learn it somewhere?
You know, i asked for feedback in the wiki thread, its comments like this which i could really do with having, because if you had said something like this in the thread, i could have made changes to it a long time ago, or provided an explanation...
01/06/2010 06:07 gabrola#21
And the "u" before int, short or long stands for an unsigned integer, short or long, which means it's a natural (non-negative) number.
01/06/2010 16:42 Kiyono#22
Quote:
Originally Posted by Korvacs View Post
You know, i asked for feedback in the wiki thread, its comments like this which i could really do with having, because if you had said something like this in the thread, i could have made changes to it a long time ago, or provided an explanation...
Oh well since I didn't get it at first glance I was trying to figure it out with google but I kinda failed and then forgot to ask it in the thread >_<
01/07/2010 07:26 spare2#23
Quote:
Originally Posted by Kiyono View Post
So you got the packet from Korvac's wiki which said "ushort" but how did you know that you had to use "uint16" cause I looked at that wiki before but I had no clue on how to figure out what you needed and I still don't know why you used "uint16" is there a chart for stuff like that or did you just learn it somewhere?
uint = unsigned 32-bit integer
uint16 = unsigned 16-bit integer = ushort
uint64 = unsigned 64-bit integer = ulong
unsigned means it is a non-negative number.
if you take out the "u" in those type words, you basically get the same set of integers plus all the negatives that are included in the set.
01/09/2010 09:20 ~Yuki~#24
Nullable just wrote a cool guide.
01/12/2010 22:37 -Shunsui-#25
I learned a lot from this nice guide,
01/13/2010 18:18 Nullable#26
Thanks, glad you like it :}
08/25/2010 21:22 _DreadNought_#27
Needs a bump, just helped me hella of alot Nullable what would I do without you!
08/26/2010 13:05 dowhatuwant#28
This is a very goodwork nullable :)
Keep it up, might start out of this =]
08/27/2010 23:07 hadeset#29
If I didn't know all this, i would really not feel like learning from this. Noobs need certain questions anwered very specifically or they won't learn much anything. Of course some geniuses do. :)
09/13/2010 17:26 HolyMage#30
Very Nice Guide:)