Warcraft III resources & community, 2003–2006 · archived

Need help with two small errors

3 posts
#1

Need help with two small errors

I began using JASS a few days ago and I got two small but strange problems.
Don't care about the variables. I just didn't wrote the rest of the code here.

Command:
set CV_Lightnings[CV_Lightning_Number] = GetLastCreatedLightningBJ()

Error message:
Invalid argument type (integer)

I don't understand what is wrong.

Command:
set CV_Affect_Unit[CV_Affect_Number] = GetRandomSubGroup(1, GetUnitsInRangeOfLocMatching(CV_Radius, CV_Target_Point, And IsUnitAliveBJ(GetEnumUnit) , And IsUnitEnemy(GetEnumUnit, And GetOwningPlayer(CV_Caster)), (IsUnitInGroup(GetEnumUnit)==false)))

Error message:
Expected '('

I can't see there is a 'C' missing.


Can someone tell me how to fix this?
#2
As for the first thing i guess you're using a global... Put udg_ in front of its name...

And for the second thing remove the And's..

If this is wrong I apologise, haven't looked very close at your code...

http://www.wc3jass.com The Jass Vault - worlds #1 Jass site.
#3

I can't see there is a 'C' missing.


Its an open bracket ( NOT a C

You left out ALOT of ( and )
When using any Get action that returns a unit, spell, trigger, ect. you must put a () after it like folowed.
GetEnumUnit()
GetTriggeringTrigger()
Other wise it will give the error:
Expected '('