Mirage Source http://miragesource.net/forums/ |
|
Signs to Binary http://miragesource.net/forums/viewtopic.php?f=201&t=948 |
Page 9 of 10 |
Author: | James [ Mon Dec 25, 2006 2:00 am ] |
Post subject: | Signs to Binary |
After adding in Signs and converting them to binary I am having a problem: Since all of the lines and names and such are strings, every time the sign sends itself it sends everything as the same string, so the sign DOES show the name and the LAST part of the line, but how do I tell the server how to differentiate between the lines when sending the packets to edit signs and show them? I have it setup like this: Name then the Background Type (either a 1 or a 2), then Line 1, the Line 2, Then Line 3. Line 1 2 and 3 are 50 character long strings, as well as the name. Background Type is a 1 character string, either a 1 or a 2. So its Name-----0--------Line1------Line2-------Line3 Any ideas? Dave? |
Author: | Lea [ Mon Dec 25, 2006 3:59 am ] |
Post subject: | |
When saving strings, you need two Put statements. Put #f, , Len(string) Put #f, , String Then when you load it, you use this Dim StringVariable as string Get #f, , strLen StringVariable = Space$(strLen) Get #f , , StringVariable Doing this makes it automatically take ou the right amount of bytes for the string. |
Author: | James [ Mon Dec 25, 2006 4:31 am ] |
Post subject: | |
That makes no sense to me. lol. Do you have a messenger anymore Dave? |
Page 9 of 10 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |