locals in gui screw up

exge

New Member
Reaction score
15
hey.. im using globals all the time.. until i read about the locals in gui thread here and decided to try it ...
so i put

local unit udg_myunit

set myunit = casting unit

but it doesnt work ... im not sure why ...
thanks in advance
 

exge

New Member
Reaction score
15
it basically happens with all my triggers ?? how do i post all ...
ps: once i removed the locals, the spells works fine
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
Post an example of a trigger with your locals in it then...



I can't tell you what the problem is if i cant inspect the source.
 

exge

New Member
Reaction score
15
ok here it is ..

Code:
cross chop
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Cross Chop 
    Actions
        Custom script: local unit udg_slasher_caster
        Custom script: local unit udg_slasher_target
        Set slasher_caster = (Casting unit)
        Set slasher_target = (Target unit of ability being cast)
        Special Effect - Create a special effect attached to the weapon of slasher_caster using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
        Special Effect - Destroy (Last created special effect)
        Wait 0.30 seconds
        Unit - Move slasher_caster instantly to (Position of slasher_target)
        Unit - Cause slasher_caster to damage slasher_target, dealing (50.00 x (Real((Level of Cross Chop  for slasher_caster)))) damage of attack type Chaos and damage type Normal
        Wait 1.00 seconds
 

exge

New Member
Reaction score
15
lolz .. you could have told me on msn ... but nvm .. that still does not solve the problem
 

NiKaNoRoU_GR

New Member
Reaction score
115
exge said:
lolz .. you could have told me on msn ... but nvm .. that still does not solve the problem
yes, but on MSN I got a problem and none of my words reach to you...
but, I stated above it's just a suggestion :p
Um, are you sure the ability targets a unit?
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
Does it work if you remove the 2 custom script lines?
And "it doesnt work" isn't a very good description of the problem. What happens?

I've read somewhere that you can't have 2 'local globals' in the same function. If thats your problem then you can try to convert your trigger to 'Custom Script' and remove every 'udg_' prefix that you find.
 

NiKaNoRoU_GR

New Member
Reaction score
115
phyrex1an said:
Does it work if you remove the 2 custom script lines?
And "it doesnt work" isn't a very good description of the problem. What happens?

I've read somewhere that you can't have 2 'local globals' in the same function. If thats your problem then you can try to convert your trigger to 'Custom Script' and remove every 'udg_' prefix that you find.
basically, now that I remember, you on MSN mentioned it actually works without them, Exge.
So?
 

exge

New Member
Reaction score
15
its not in jass.. i just added those lines so that a spell could be mui, hopefully .... i saw it on a thread here...the spells dont work as in .. none of the variables become set ...
 

NiKaNoRoU_GR

New Member
Reaction score
115
You can also try and use it the old way, with casting unit and target of ability being cast instead of Vs.
 

exge

New Member
Reaction score
15
i have waits .. and normally they screw up the casting and target part ... trust me ... i tried it
 

NiKaNoRoU_GR

New Member
Reaction score
115
exge said:
ok, then, that's settled.
I don't use scripts in MOST of my triggers and are fine, you can do so...
if that happens to all your triggers, then maybe stop the CSs.
 

exge

New Member
Reaction score
15
i had no choice but to stop using them ... so now my spells are not mui .. and i find jass really hard to learn...
mayb cos when i learned other languages .. i had a conpiler that shows you the errors ... jasscraft ... is a bit different
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top