
WRITE_ASCII offset ~%variable%~
#1
Posted 04 October 2003 - 06:17 AM
READ_ASCII offsetA "variable"
WRITE_ASCII offsetB ~%variable%~
It would also be nice if READ_ASCII variables could be used by WHILE and IF_EVAL. Only an equality value would be required.
READ_ASCII offsetA "variable"
WRITE_ASCII offsetB ~newtext~
IF_EVAL NOT ("%variable%" = ~FOO~)
Thank you.
#2
Posted 06 October 2003 - 09:53 PM
READ_ASCII should work fine in WHILE and IF_EVAL. Can you give an example of code that fails?
#3
Posted 07 October 2003 - 04:09 AM
Thank you.Many people expect WRITE_ASCII to write literal text, but I'll add a WRITE_EVALUATED_ASCII for you. Look for it in the next version.
I assumed I was wrong here and went back and checked my code. However, I can't make it work. An example:READ_ASCII should work fine in WHILE and IF_EVAL. Can you give an example of code that fails?
I've tried with various combinations of ~~ and "" around the variables in case that was the problem, but the result is always:COPY_EXISTING ~c6catti.cre~ ~override/c6catti.cre~
READ_LONG "0x2bc" "itemsoffset"
READ_LONG "0x2b8" "itemslot"
READ_SHORT ("%itemslot%" + 0x12) "weapon1"
READ_ASCII ("%itemsoffset%" + "%weapon1%" * 0x14) ~oldbow~
WRITE_ASCII ("%itemsoffset%" + "%weapon1%" * 0x14) ~NEWBOW01~
IF_EVAL ("%oldbow%" = "CATTIBOW")
I haven't tried with WHILE yet.ERROR: cannot convert ~%oldbow%~ (or ~CATTIBOW~) to an integer