Strings
Jun 5 2009, 1:33 am
By: New-Guy  

Jun 5 2009, 1:33 am New-Guy Post #1



I'm working on my RPG for the Last Stand contest, and I'm a little worried about my strings. I'm not sure if I'll have enough room...

I mainly want to know, what does this phrase mean?
Quote
each string has a 2 byte offset value, and a 1 byte null terminator.
It's what it say's in the Wiki, but I don't understand what it means...



None.

Jun 5 2009, 1:49 am Falkoner Post #2



Each character takes up a byte, at the front of the string there's a 2 byte offset(kind of like an address), and a 1 byte null terminator, the character that tells SC that it's at the end of the string, all characters in between will take up an addition byte, you can have 65535(correct me if I'm off a bit) bytes in your string section max.



None.

Jun 5 2009, 1:58 am New-Guy Post #3



So every string takes up 2 bits, and every letter in the string takes a bit, and ending the string takes a bit?



None.

Jun 5 2009, 1:59 am BiOAtK Post #4



As a metaphor, it's like a telegram. Maybe it says START at the beginning (the two byte beginner) and STOP at the end of a sentence (the one byte null ender). Then there's the bytes in between to make the words.



None.

Jun 5 2009, 2:03 am Falkoner Post #5



Yes, a null(empty) string takes up 3 bytes, any additional characters add a byte, so the string "Fat chicks" would take up 2(offset)+10(characters+1(null terminator), 13 bytes out of your maximum of 65535.



None.

Jun 5 2009, 3:56 am Pyro682 Post #6



And New-Guy, it's "Byte", not "Bit"



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:00 am]
Oh_Man -- he hasnt won a single game so far this is hilarious
[11:41 pm]
Oh_Man -- new arty username Rage Against The Machine
[10:14 pm]
Oh_Man -- https://m.youtube.com/watch?v=KPXri8q9ZBs artys vsing the bot now
[08:12 pm]
Ultraviolet -- do you even lift bro?
[2026-9-23. : 5:21 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: NudeRaider yeh thts straight up cheating
the mutas yes, the wraiths probably not. Have you even watched the video? ;)
[2026-9-23. : 12:56 pm]
Oh_Man -- NudeRaider
NudeRaider shouted: Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
yeh thts straight up cheating
[2026-9-23. : 12:24 pm]
Oh_Man -- arty's done another vid. he's also announced he's going to organise showmatches with pro, with NO maphacks, so we can see its actual capabilities
[2026-9-23. : 10:09 am]
NimoStar -- It can by playing the same map thousands of times. It is similar to AI speedrunning games
[2026-9-23. : 2:30 am]
Symmetry -- I dreamed about that as a kid. The idea of a computer capable of analyzing a starcraft map and calculating the fastest possible way to hit the victory condition
Please log in to shout.


Members Online: Symmetry, Ultraviolet