arielnmz Posted December 4, 2013 Share Posted December 4, 2013 Hello everyone, this is the problem I create a new formatted string and store it to [email protected] like this: 0AD3: string [email protected] format "obj_id_%d" OBJ_MODEL // Nombre de sección de ini And if I store something into var [email protected], the text is displayed like this: obj_ -Ûi62 However, anywhere in the script before storing anything into [email protected], the text is displayed/read correctly: obj_id_362 Then I tried to use this: 0AC8: [email protected] = allocate_memory_size 64 But I get the same results. I hope you can help me... Thank you everyone! Link to comment Share on other sites More sharing options...
DK22Pac Posted December 4, 2013 Share Posted December 4, 2013 That's because [email protected] variable will use 4 variables - [email protected], [email protected], [email protected], [email protected] to store the string. So while you need text in [email protected], you must not touch these variables. Link to comment Share on other sites More sharing options...
arielnmz Posted December 4, 2013 Author Share Posted December 4, 2013 Ok, so you say locals are stored into contiguous addresses?? What if I allocate 32 bytes on [email protected]?? Thanks! Link to comment Share on other sites More sharing options...
Silent Posted December 4, 2013 Share Posted December 4, 2013 If you want to use CLEO4 opcodes with allocated memory, just refer to regular variables, and not longstrings. In your case, use [email protected] in sprintf (after you've called memory alloc, storing the memory pointer to this var). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now