• 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] big problem!

Status
Not open for further replies.
Level 2
Joined
Mar 20, 2005
Messages
8
I was saving a map I'm working on, when suddenly the editor displayed an error message, claiming something was wrong with the script.
But that is impossible, seeing as I didn't alter the script, and the map was able to save like 500 times before, without problems.

What do the errors mean?
"Invalid number of arguments":
set u = CreateUnit( p, 'h011', -2368,0, -2176,0, 270,000 )

please help me, I don't know anything about custom scripts.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
This is a common error if your triggers are in jass and it means you have made a mistake and called a function with more or less than its required number of values.
If your triggers are in GUI it should not happen.
If your triggers are in GUI and it does happen rewrite the trigger that the error is found in.

By the look of it your triggers are in jass SCRIPT due to you using a local varible.

set u = CreateUnit( p, 'h011', -2368,0, -2176,0, 270,000 )

The mistake is you got 8 values your giving to the function when it only needs 5!
Try this and it should not complain.

set u = CreateUnit(p,'h011',-2368,-2176,270)

Comas [,] seperate values when you call a function. (CreateTimerBJ(false,10.9))
Periods [.] can be used in real values (189.356)
 
Status
Not open for further replies.
Top