Importing a custom common.j

Strilanc

Veteran Scripter
Reaction score
42
I've been trying to import a custom common.j and I keep having problems.

What I did:
- Used MPQViewer to extract common.j from war3.mpq
- *Modified common.j to include GetUnitGoldCost and GetUnitWoodCost (also tried without modifying)
- Went to the import manager in world edit and imported the extracted common.j
- Changed "Full Path" to "scripts\common.j" (also tried just "common.j"

What goes wrong:
- I can save once (which I assume 'really' imports it), but the second time I save I get a ton of 'script errors' on lines that are fine. There are even 'compile errors' on the auto-generated code from placing units and such!
- If I remove the imported file, and save twice, the errors go away.

What am I doing wrong?

*edit* It looks like I was getting the 'wrong' common.j because I was using war3.mpq. I tried extracting common.j from the other MPQs one by one, and testing them. war3patch.mpq seems to be working so far.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Instead of editing the common.j, why don't you just put the functions in the map's header? It doesn't take long, just copy 'n' paste. :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top