Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 5 of 5 1 2 3 4 5
Re: Bps , bps peak & latency [Re: EpsiloN] #165325
11/16/07 18:13
11/16/07 18:13
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Lite-C offers bool datatype???

Each letter in a string is one byte. You can easily see this when taking a look at atypes.h. A sTRING is some information stuff for the engine and internal linking plus a plainand simple pointer for a char array. A char is 1Byte in size.

Re: Bps , bps peak & latency [Re: FBL] #165326
11/16/07 19:15
11/16/07 19:15
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:


Lite-C offers bool datatype???





I could have sworn it did, but I'm not seeing it.
Maybe I'm confusing it with the Char datatype and confusing it's 1 byte for 1 bit.
Still, it'd be nice to have a bool, don't you think? For flags and such?

Re: Bps , bps peak & latency [Re: fastlane69] #165327
11/16/07 20:38
11/16/07 20:38
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Depends on what the compiler itnernally does with it. May programming language which offer bool datatype in fact reserver at least one byte of memory for a bool.

So what I do is using a var to store my flags and then turn single bits on and of by or/and-ing. Just as Lite-C does it for native flags.
I'm fine with that.

Re: Bps , bps peak & latency [Re: FBL] #165328
11/16/07 20:50
11/16/07 20:50
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
So , 1 var = 4 bytes (I guess size doesnt matter) = 1 string with 4 letters/numbers? If thats the case , than it wont be that much practical
Btw , I'm with A6 , so I dont understand much about any C (lite,#,++) I dont want to get involved in that because I often forget when I learn something new so I might forget all about C-Script...(Thats 7 years of playing arroud).
And , I didnt understood that part :
Quote:

So what I do is using a var to store my flags and then turn single bits on and of by or/and-ing.



Is this something like in the weapon templates , where you have firing modes for example 2,4,8,16...etc. and by setting + mode + mode you get a result to compare ? I'm not shure how exactly does it divide them , but I havent tought on that much. Maby I should , its another way to pack variables
So , fastlane , there is no software for 'local' traffic scanning ? (On one PC)


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Bps , bps peak & latency [Re: EpsiloN] #165329
11/16/07 21:13
11/16/07 21:13
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Yep that's the way this is done

by and-ing with 1 you get bit0, and-ing with 2 delviers bit 2, 4 for bit 3, 8 for bit 4 and so on.

About strings...

do a printf("%d", sizeof(STRING)) and then add 1 more byte for each single letter and when you're done add one byte more for the NULL termination of the string.

Then you'll know the exact size of your STRING.
I don't know if Acknex sends everything of a string or just the char array... you'll have to ask JCL about this.

Page 5 of 5 1 2 3 4 5

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1