Apr 25 2013, 09:56 AM Post #1 | |
The New Guy! Posts: 11 From: Missouri, US Joined: 27-March 12 | Is there a string limit on this? I have one string with 16 characters and it works fine. I have another with 17 and it just won't work. For some reason this is my weak point when it comes to coding. -------------------- |
Apr 26 2013, 02:26 PM Post #2 | |
The New Guy! Posts: 9 Joined: 20-December 12 | It deppends of the string type to store the result into. X@v strings have a limit of 16 characters. X@s string have a limit of 4 characters. If you're trying to make something like "languages", take a look at the power of .fxt and that opcode |
Apr 26 2013, 06:21 PM Post #3 | |
Trained Member Posts: 77 Joined: 25-October 10 | It deppends of the string type to store the result into. X@v strings have a limit of 16 characters. X@s string have a limit of 4 characters. If you're trying to make something like "languages", take a look at the power of .fxt and that opcode Someone who knows no more than the OP shouldn't reply either. @s variables consist of 8 bytes and therefore they're able to store up to 7 characters as summing that is NULL terminated. @v variables consist of 16 bytes and therefore they're able to store up to 15 characters as summing that is NULL terminated. |
Apr 27 2013, 07:21 AM Post #4 | |
The New Guy! Posts: 11 From: Missouri, US Joined: 27-March 12 | So how can I increase the characters it can have? I hate this allocating byte aspect lol -------------------- |
Apr 27 2013, 08:51 AM Post #5 | |
Trained Member Posts: 77 Joined: 25-October 10 | You can do this: CODE :myStringSpace hex 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 16 bytes 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 16 bytes 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 16 bytes 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 16 bytes 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 16 bytes end Somewhere in the code, you'll have to get a pointer to this label: CODE 0AC6: get_label_pointer @myStringSpace store_to 0@ Or you can use getLabelOffset CLEO SCM function that you can find somewhere (use Google). |
Sep 21 2013, 07:59 AM Post #6 | |
The New Guy! Posts: 2 Joined: 20-September 13 | Just what I needed... Thanks! |