subtledoctor Posted July 21, 2017 Share Posted July 21, 2017 When I perform READ_2DA_ENTRY on the entries in column 9 (KITIDS) of kitlist.2da, the resulting value is a decimal integer. I would like to perform the math on this number and then write it back into the table... but it is being written back in decimal format. While the existing entries are in hex format. So the result looks like: 0x00004024 0x00004025 0x00004026 16423How can I convert the integer back to hex format to write it back into the table? I don't see anything in the Weidu documentation about conversion of integer values... Link to comment
argent77 Posted July 21, 2017 Share Posted July 21, 2017 In this case the (undocumented) SPRINTF command would be sufficient: SET value = 16420 SPRINTF hex ~%x~ (value) // hex contains the string "0x4024" Choose TO_HEX_NUMBER if you prefer a prettified output (with leading zeroes). Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.