| 08-15-2006, 08:23 PM | #1 |
well, i am tryin to modify a spell thats from sear.ch the spell draws a pentagram then damages all unit within the pentagram i got the create pentagram down but i cant the amage into the script this error appears JASS:Line 337: expected endif Line 339: expected endif JASS:function Trig_damage_Actions takes nothing returns nothing call UnitDamagePointLoc( GetTriggerUnit(), 35.00, 400.00, GetUnitLoc(GetTriggerUnit()), 250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC ) endif thats the damage ive incorperated, and Line 339 is the call UnitDamagePointLoc and 337 is the line above function Trig_damage_Actions takes nothing returns nothing |
| 08-15-2006, 08:26 PM | #2 |
endfunction, not endif. |
| 08-15-2006, 08:36 PM | #3 |
i figured it out thanks EDIT: just tested it and it doesnt damage them at all, |
| 08-15-2006, 09:12 PM | #4 |
You registered that function as action for a trigger, right? |
| 08-15-2006, 09:14 PM | #5 |
sorry but no idea wut that is, is that usually at the top where it checks for conditions and such? |
| 08-15-2006, 09:33 PM | #6 |
Hmnn, I suggest you do not modiffy stuff without at least reading a tutorial about jass, preferably one about the JASS' trigger object |
| 08-15-2006, 10:34 PM | #7 |
well then can some1 do this for me?? ive attached the map the specified damage trigger is under the catagorie: Initilization and the spell trigger is: Armageddon i put a line in the armegeddon trigger near the bottom that says //-----INSERT DAMAGE HERE----- thanks |
| 08-16-2006, 12:02 AM | #8 |
May i ask why your using Jass for this? It can be easily done in GUI. |
| 08-16-2006, 12:22 AM | #9 | |
Quote:
|
| 08-16-2006, 05:25 AM | #10 |
TideHunter's right. You got the special effect(the pentagram). Just do the damage in GUI. Besides, I don't see a problem if you use two triggers for the same spell. |
| 08-16-2006, 10:03 AM | #11 |
Im still in the imaginary anti GUI squad. But if your having problems, do it in GUI, convert to Jass and see the correct answer. Then build around that to make it more Jass like, no leaks, no BJs, etc. When it says Line ###. Dont listen to it, its normally the line below. Unless you use PJass, which is accurate. Now, this is your action in GUI: Trigger: Actions
![]() Unit - Cause (Triggering unit) to damage circular area after 35.00 seconds of radius 400.00 at (Position of (Triggering unit)), dealing 250.00 damage of attack type Spells and damage type MagicConvert to Jass we get: JASS:call UnitDamagePointLoc( GetTriggerUnit(), 35.00, 400.00, GetUnitLoc(GetTriggerUnit()), 250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC ) Now lets start making it better. We use TriggerUnit twice, so lets make that a local JASS:local unit u = GetTriggerUnit() call UnitDamagePointLoc(u, 35.00, 400.00, GetUnitLoc(u),250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC ) And were also leaking a location JASS:local unit u = GetTriggerUnit() local location l = GetUnitLoc(u) call UnitDamagePointLoc(u, 35.00, 400.00, l, 250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC) Then we destroy the location and null it with the unit. JASS:local unit u = GetTriggerUnit() local location l = GetUnitLoc(u) call UnitDamagePointLoc(u, 35.00, 400.00, l, 250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC) call RemoveLocation(l) set l = null set u = null And were done, thats the advantage of GUI. Im still against it. If the W/E's open, and i cant be bothered opening JassCraft to get a function name or the var passed into it, i use GUI and convert. |
