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.
[10:41 am]
ManCubuS -- Seems like something's broken regarding the site then. Sadge...
[07:36 am]
Oh_Man -- have i ever told u guys my SC2 pro-gamer story
[11:30 pm]
Ultraviolet -- That's strange, it looks like you targeted the base image file (sometimes people make the mistake of just using the imgur page link which doesn't work for embedding) but it still didn't work it sounds like.
[03:34 pm]
ManCubuS -- Used : " [img=https://i.imgur.com/gpOjTuD.jpeg] "
[03:28 pm]
ManCubuS -- Even tried with imgur, doesn't attach.
[03:14 pm]
ManCubuS -- I should try a workaround, thanks! Sadly imgur is blocked in my country for some unknown reason.
[03:05 pm]
NudeRaider -- I think SEN has trouble with https or hotlinking is forbidden. It certainly is nothing about the size, it just fails to get any size. You can get it working if you use imgur and include the actual image link for the img tag. Like this: [img=https://i.imgur.com/ddYqXZa.jpeg]
[11:15 am]
ManCubuS -- Hey fellas! Anyone knows why when I try to upload an image it says "failed to get image size"? I even tried making it so small. Imgur isn't working here and I tried postimg no luck.
[2026-7-23. : 6:40 am]
Oh_Man -- true
[2026-7-23. : 3:16 am]
RIVE -- Still annoyed there was never a trigger to stop or pause wavs.
Please log in to shout.


Members Online: ManCubuS