• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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,201
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