memoryWriteUString ?

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
Forum rules
This is a sub-forum for things specific to MicroMacro.

This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Post Reply
Message
Author
Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

memoryWriteUString ?

#1 Post by Zilvermoon » Wed Oct 28, 2009 2:55 am

Hi just wanted to know if there is a plan to support writing an U string to memory ?

Currently it looks like there are no way to write a string to memory at all ...

memoryWriteString
memoryWriteUString
memoryWriteStringPtr
memoryWriteUStringPtr

none of these are available, so what is my option convert a string and write it with "memoryWriteByte"?
or you got any other suggestions?

Zilvermoon

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: memoryWriteUString ?

#2 Post by Administrator » Wed Oct 28, 2009 9:29 am

The problem with string writing to memory comes when you don't know the buffer size. If you overstep the boundary, you're likely to crash the program. Unicode is even more of a pain because there are so many different types of unicode that follow different rules. Sometimes characters are 2 bytes, sometimes 4 bytes, or even 1, 2, or 4 within the same string. Sometimes embedded zeros work, and sometimes they don't. How you should write the string depends entirely on exactly how unicode was implemented within that program. There is also the problem that unicode isn't supported by Lua.

About the best thing that can be done is to write the bytes one at a time and make sure you are using the correct byte widths and terminator.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests