• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Errors

Status
Not open for further replies.
Level 2
Joined
Sep 2, 2007
Messages
9
Sup everyone. Sorry for this noobish question but whenever I import anything JASS related into my map it gives me hundreds of errors. Like honestly plenty. It also tends to happen every now and then for no reason when I change something in my map startup script. I have basic JASS knowledge but I'm still learning. I'm trying to import blade.dk's inventory system into my map, it requires two systems to run and they both need to be imported into the startup script. How would I go about importing it without the errors? Thanks in advance :)
 
Level 6
Joined
Sep 13, 2008
Messages
261
Most scripts have instructions on how to import them. If they don't then import the triggers as is. Then click on the map name in the triggers section. That is where the extra libraries and declared functions are. Copy them to your map making sure not to have the same function etc listed twice.
Every system is different so it's best to follow their instructions.

Some systems have objects that support the system, copy them from the object manager.

That's all I can tell you. If someone else already imported said system then they may give you better instructions than me.
 
Level 6
Joined
Sep 5, 2007
Messages
264
There are certain things that may occur when importing any code into a map... You may already have a function with the same name as one that you're importing, syntax errors, etc.

:fp: As for the editor spitting 5,000,000 different errors at you... Let's say for example I botch up a piece of code:
JASS:
if <something> == <something else> then
    <insert random code in here>
endiF

Now look at the "endif" the f is a capital letter (capitals count as a different statement EG: "IF" and "if" are 2 totally different things), this will cause the editor to generate an error. But, the error resides in a statement that closes off a section of code... EG: loop/endloop, function/endfunction, if/endif, etc.

Now the function that contained that error, won't close itself correctly either (waiting for a correct "endif") and the next function defined will go "Hey, buddy, you can't define me. You're not finished with the other one yet." creating yet another error. The same thing applies to additional "if" statements after the errored one.

This process chain-reacts through the rest of the script from that point onwards, creating "fake" errors.

If you ever get a massive list of errors, always fix the top one first, then try and save again. :thumbs_up:
 
Status
Not open for further replies.
Top