| 11-15-2004, 06:40 PM | #1 |
My local variables wont work im doing it like this: Code:
local effect a blah blah blah... set a = GetLastCreatedEffectBJ() blah blah blah... endfunction because every time i try to test it in map a box comes up and says there is something wrong with those to lines!? :\ |
| 11-15-2004, 07:49 PM | #2 |
The error is in the blah lines, sometimes the editor tells you an error but shows the line that is after the error instead of the line that is on the erro |
| 11-16-2004, 05:17 AM | #3 |
I got 3 local variables, there is 6 errors 3 where i start and 3 where i set them? |
| 11-16-2004, 08:03 AM | #4 |
Try showing us the code above that line. It looks like you have a syntax problem in the function before that one. |
| 11-16-2004, 11:40 AM | #5 |
Guest | Try to take a screenshot of the trigger instead. Then it would be easier to find the bug. |
| 11-16-2004, 11:44 AM | #6 |
Code:
function UseDS takes nothing returns nothing
if ( Trig_Use_Demonic_Sence_Func001C() ) then
local effect a
local real ms
local real ts
// |...::Special Effects::...|
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 2.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 70.00, 0, 0, 5.00 )
call TriggerSleepAction( 2.00 )
call SetSkyModel( "Environment\\Sky\\Outland_Sky\\Outland_Sky.mdl" )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_DemonHunter, "Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl" )
set a = GetLastCreatedEffectBJ()
// |...::Animation::...|
set ms = GetUnitMoveSpeed(udg_DemonHunter)
set ts = GetUnitTurnSpeed(udg_DemonHunter)
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Use_Demonic_Sence_Func001Func012A )
call SetUnitVertexColorBJ( udg_DemonHunter, 100.00, 100.00, 100.00, 0.00 )
call SetUnitTimeScalePercent( udg_DemonHunter, 100 )
call SetUnitTurnSpeedBJ( udg_DemonHunter, udg_ts )
call SetUnitMoveSpeed( udg_DemonHunter, udg_ms )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 1.50, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 70.00, 0, 0, 5.00 )
call TriggerSleepAction( 1.50 )
call CinematicFilterGenericBJ( 0.30, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\DreamFilter_Mask.blp", 0.00, 0.00, 0.00, 100.00, 100.00, 0, 0, 10.00 )
// |...::BEFORE::...|
call TriggerSleepAction( 13.00 )
// |...::AFTER::...|
call DisplayCineFilterBJ( false )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 2.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 70.00, 0, 0, 5.00 )
call TriggerSleepAction( 2.00 )
call SetSkyModel( "Environment\\Sky\\Sky\\SkyLight.mdl" )
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Use_Demonic_Sence_Func001Func027A )
call DestroyEffectBJ( udg_a )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 1.50, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 70.00, 0, 0, 5.00 )
call TriggerSleepAction( 1.50 )
else
call DoNothing( )
endif
endfunction |
| 11-16-2004, 12:39 PM | #7 |
The if is your problem. There can't be any code before the declaration of local variables (except other local variables and function blah takes blah returns blah) in a function. BTW you might want to get rid of the else in the if. The GUI automaticly generates else even if you don't put anything in it. Also, you can set local variables when you declare them. Example: local location PointOfDoom=GetRectCenter(gg_rct_Region_001) |
