Rastor Posted January 18, 2005 Share Posted January 18, 2005 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
Ghreyfain Posted January 18, 2005 Share Posted January 18, 2005 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
Rastor Posted January 18, 2005 Author Share Posted January 18, 2005 I made the change and I'm still getting the exact same error. Link to comment
the bigg Posted January 18, 2005 Share Posted January 18, 2005 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. Link to comment
Guest your Name Posted January 18, 2005 Share Posted January 18, 2005 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 Posted January 18, 2005 Share Posted January 18, 2005 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.