![]() |
Converting Fixed Length String in Binary - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Converting Fixed Length String in Binary (/showthread.php?tid=1365) |
Converting Fixed Length String in Binary - William - 25-10-2007 Remember, this is only for knowledge. I used more variables in the ItemRec since thats what my game has. So this is not copy paste. Just knowledge. Im also pretty certain that you can do ItemD(i) = Item(i), its just that I felt like doing ItemD(i).Pic = Item(i).Pic etc.... If you have the fixed length string as the default in MS you will only be able to have a item name of 20 characters. In order to fix that you will need to make a external program and include these things: In form_load: Code: For i = 1 To MAX_ITEMS Code: Dim i As Long Another button that saves the new file with the new length of the name: Code: Dim FileName As String And also make a module and add this: Code: Public Const MAX_ITEMS = 200 And also the current item rec, 20 on the name is the same as on a default MS item name length. I changed it to 30 on the ItemD(): Code: Type ItemRec Code: Public Item(0 To MAX_ITEMS) As ItemRec Now when you press convert and then save it will write to a new folder and you'll just replace the old. Also remember to change the NAME_LENGTH in the itemRec to 30 instead. Just felt like posting this cause I was bored doing math. |