• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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:
Level 20
Joined
Aug 13, 2013
Messages
1,696
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.
 
Level 4
Joined
Oct 28, 2012
Messages
82
Thank ^jakeZinc
It make sense, I will try now.
But there one thing. what is BJ. I really new to this.
--- hope ít good.
 
Level 4
Joined
Oct 28, 2012
Messages
82
The same Error.

Type mismatch a assignment.
on "k=0.00"

How did I do to get that error ??
 
Level 4
Joined
Oct 28, 2012
Messages
82
well. when I // "set k=0.00" then error happen again. This time it on set k=8*g
>_< What is the problem
 
Level 4
Joined
Oct 28, 2012
Messages
82
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
 
Level 4
Joined
Oct 28, 2012
Messages
82
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.
Top