Jump to content

READ_ASCII Problems


Rastor

Recommended Posts

I'm having a few problems with the following code:

 

BEGIN @8

COPY ~r#ports/bodhi~ ~override~

PRINT @10
COPY_EXISTING_REGEXP ~.*\.cre~
READ_ASCII 0x34 "name"
PATCH_IF ("%name%" STRING_COMPARE_CASE "NBODHIS")
 THEN BEGIN
  WRITE_ASCII 0x34 ~R#BODHI~
 END

 

WeiDU is giving a syntax error on the READ_ASCII line and refuses to install any of the components of the mod. It was working just fine and then stopped working.

 

I can't see anything wrong with this, but hopefully someone else can.

Link to comment
PATCH_IF ("%name%" STRING_COMPARE_CASE "NBODHIS")

The problem isn't in READ_ASCII, actually. I had this problem just yesterday, in fact. It's in the STR_CMP line you have.

 

PATCH_IF ("%name%" STRING_COMPARE_CASE "NBODHIS" = 0)

 

This is what it should be.

Link to comment
Guest your Name
Ghrey's right, though: STR_CMP and STRING_COMPARE_CASE return 0 if the strings are equal, so you need the = 0 bit.

Or, to be evil, PATCH_IF NOT (blah STR_COMP blah).

Link to comment
Guest RasAway
COPY_EXISTING_REGEXP ~.*\.cre~ ~override~.

You were missing the ToFolder.

Ghrey's right, though: STR_CMP and STRING_COMPARE_CASE return 0 if the strings are equal, so you need the = 0 bit.

Remind me not to mod after being awake for 20 hours straight. :)

 

Thanks guys.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...