• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help Jass.

Status
Not open for further replies.
Level 4
Joined
Oct 28, 2012
Messages
82
JASS:
function Trig_TgaaraPyramid_Actions takes nothing returns nothing
    local location lll
    local real g
    local real k=0
    set g=g+1
    set k=100+4*g
    set lll = PolarProjectionBJ(udg_locations03[10],100+6*g,10*g)
    call CreateNUnitsAtLoc( 1, 'z004', GetOwningPlayer(udg_units07[1]), lll , g*8 )
    call SetUnitScalePercent( bj_lastCreatedUnit , k, k , k)
    call UnitApplyTimedLifeBJ( 1,'BTLF',bj_lastCreatedUnit)
    set lll = PolarProjectionBJ(udg_locations03[10],100+6*g,180+10*g)
    call CreateNUnitsAtLoc( 1, 'z004', GetOwningPlayer(udg_units07[1]), lll , g*8 )
    call SetUnitScalePercent( bj_lastCreatedUnit , k,k , k)
    call UnitApplyTimedLifeBJ( 1,'BTLF',bj_lastCreatedUnit)
    set k=8*g
    call SetUnitScalePercent( udg_TgaaraPyramid, k, k , k)    
    set k=0.0
    
    set lll = 0
    call RemoveLocation(lll)
    if(g==50)then
        set g=0
    endif
endfunction

//===========================================================================
function InitTrig_TgaaraPyramid takes nothing returns nothing
    set gg_trg_TgaaraPyramid = CreateTrigger(  )
    call DisableTrigger( gg_trg_TgaaraPyramid )
    call TriggerRegisterTimerEventPeriodic( gg_trg_TgaaraPyramid, 0.04 )
    call TriggerAddAction( gg_trg_TgaaraPyramid, function Trig_TgaaraPyramid_Actions )
endfunction
That's it.
Error is

Type mismatch a assignment.
on "k=0.0"
Please help
 
Last edited:
The K variable is REAL and you put it a INTEGER 0, you must put hexadecimal values in REAL like: 0.00

Edit:
MUST BE LIKE THIS:
JASS:
function Trig_TgaaraPyramid_Actions takes nothing returns nothing
    local location lll
    local real g
    local real k = 0.00
    set g = g + 1.00
    set k= 100.00 + 4.00 * g
    set lll = PolarProjectionBJ(udg_locations03[10],100.00 + 6.00 * g, 10.00 * g)
    call CreateNUnitsAtLoc( 1, 'z004', GetOwningPlayer(udg_units07[1]), lll , g*8 )
    call SetUnitScalePercent( bj_lastCreatedUnit , k, k , k)
    call UnitApplyTimedLifeBJ( 1,'BTLF',bj_lastCreatedUnit)
    set lll = PolarProjectionBJ(udg_locations03[10],100+6*g,180+10*g)
    call CreateNUnitsAtLoc( 1, 'z004', GetOwningPlayer(udg_units07[1]), lll , g*8 )
    call SetUnitScalePercent( bj_lastCreatedUnit , k,k , k)
    call UnitApplyTimedLifeBJ( 1,'BTLF',bj_lastCreatedUnit)
    set k = 8.00 * g
    call SetUnitScalePercent( udg_TgaaraPyramid, k, k , k)    
    set k = 0.00
    
    set lll = 0
    call RemoveLocation(lll)
    if( g == 50.00 )then
        set g = 0.00
    endif
endfunction

//===========================================================================
function InitTrig_TgaaraPyramid takes nothing returns nothing
    set gg_trg_TgaaraPyramid = CreateTrigger(  )
    call DisableTrigger( gg_trg_TgaaraPyramid )
    call TriggerRegisterTimerEventPeriodic( gg_trg_TgaaraPyramid, 0.04 )
    call TriggerAddAction( gg_trg_TgaaraPyramid, function Trig_TgaaraPyramid_Actions )
endfunction

And Also do not use BJ's because BJ's Are bad some are aren't. Use natives for this. You use so many BJ's in this trigger.
 
Thank ^jakeZinc
It make sense, I will try now.
But there one thing. what is BJ. I really new to this.
--- hope ít good.
 
well. when I // "set k=0.00" then error happen again. This time it on set k=8*g
>_< What is the problem
 
How to post a picture, cause I want to post this.
It say my error is here
"// set k=8*g"
how "//" can get error. HOW
 
Solved

jakeZinc

Reals are numbers with decimal places. It has no differences whenever you type 0, 0., 0.0, 0.00, 0.0000, etc.

the error here is this line:
set lll = 0
You can't assign a real/integer value to a child handle :D
Assign null value to it.

WORK.
I cant believe in my eyes, but it not error anymore. Thank so much:thumbs_up::thumbs_up::thumbs_up:
 
Status
Not open for further replies.
Back
Top