HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jass Help!

12-16-2004, 08:46 PM#1
BuRnInSpartan
call CreateNUnitsAtLoc( 5, 'nban', Player(PLAYER_COLOR_RED) GetRectCenter(gg_rct_JASS)

yes this is a newb trigger but it comes up with an error everytime i save for this line...

Line 1967: Invalid argument type (playercolor)

can anyone help?
12-16-2004, 08:50 PM#2
Guest
Instead of Player(PLAYER_COLOR_RED) use Player(0)?
12-16-2004, 08:55 PM#3
BuRnInSpartan
i just saw that and tried it but it came up with

Line 1967: Expected'
12-16-2004, 09:25 PM#4
Ryude
call CreateNUnitsAtLoc(5,'nban',Player(0),GetRectCenter(gg_rct_JASS))

You were missing a ',' and a ')'
12-16-2004, 09:33 PM#5
BuRnInSpartan
that put like 20 more errors on
12-16-2004, 10:43 PM#6
Guest
function foo takes nothing returns nothing
call CreateNUnitsAtLoc(5,'nban',Player(0),GetRectCenter(gg_rct_JASS),0.0)
endfunction

You forgot the last parameter(the facing).
12-16-2004, 10:53 PM#7
BuRnInSpartan
yea the facing bj part... i figured that out and when i saved perfect... however in the game nothing happens... i added a game elapse time = to 1 and it worked why is this?

does every trigger need and event? that isn't the case with normal triggering... is it different for JASS?
12-16-2004, 11:07 PM#8
Guest
Actually, this is the same with normal triggering. If you don't add an event, the trigger will never fire. (Unless you manually add an event on the fly)
If you want the trigger to fire, use "Map Initialisation" or in some cases "Elapsed Time is 1 Sec".

Events work like "or" not like "and" anyway. It fires for every event in the list, if there arent any, it doesnt fire.
12-17-2004, 12:00 AM#9
BuRnInSpartan
yea i thought thanks