Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Significance of number returned when 'net get int' is used when an int was not put? Multisync

Author
Message
Aralox
12
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 13th Jul 2010 12:01 Edited at: 13th Jul 2010 12:03
When i net get an int without first net putting one in, i get 23144336. Just out of curiosity, what is this number?

EDIT: float seems to do it as well, and im sure other data types do as well (except string, got a blank with that)

Benjamin
16
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 13th Jul 2010 15:32
No significance.
Aralox
12
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 13th Jul 2010 15:44 Edited at: 13th Jul 2010 15:45
lol really? so theres no danger in calling it again and again? Ive found a way to take advantage of it in my program, by* using that massive number to detect that no more data is coming through. Its probably inefficient and can lead to some annoying bugs later, but for now its a good quick fix .

PS: thanks for the plugin! ive found it very useful, and immensely helpful in easing beginners to networking (like me) into the field.

KISTech
11
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 13th Jul 2010 20:05
The only problem with that, is the number going to be the same every time? and on every machine?

Aralox
12
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 14th Jul 2010 03:05
i tried it a few times, and its the same on mine (theres a few variations, like calling a float gets you a tiny number). but yeah on the whole its unreliable

Benjamin
16
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 14th Jul 2010 07:53
Generally you you should know how big each message is anyway, either by creating a list of message formats or by using the command to get the message size. Don't rely on some random number returned to be consistent across multiple machines.
Aralox
12
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 14th Jul 2010 09:57
ahh thats a much better command. didnt see that before, ill use net get message size and remainder now. thanks

Login to post a reply

Server time is: 2019-10-17 04:18:07
Your offset time is: 2019-10-17 04:18:07