deal damage error

SanKakU

Member
Reaction score
21
so i tried make unitdamagepoint function of my own, having heard that the function doesn't work well for whatever reason, i didn't understand at the time.

anyhow. the problem as i had noticed it was i was not able to use the filter correctly.
i'm probably missing something, but don't know what.

so i noticed spell was hurting ALL unitss including caster and allies even though filter supposed to check for if unit was an enemy. so i tried adding a small if then section in the primary udp function in order to temporarily deal with the problem. but i don't want to make a big long list of ifs in my udp function so please help me out here and get this working.


here it is in a library:
JASS:
public function UDP takes unit damager, group uir, real px, real py, real rr, boolexpr fltr, attacktype at, damagetype dt, weapontype wt, real damage, boolean spareally returns integer
local unit first = null
local integer c =0
call GroupEnumUnitsInRange(uir,px,py,rr,fltr)
loop
set first = FirstOfGroup(uir)
exitwhen first == null
call GroupRemoveUnit(uir,first)
set c=c+1
if spareally then
if IsUnitAlly(first,GetOwningPlayer(damager)) then
else
call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
endif
else
call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
endif
endloop
set first = null
return c
endfunction
///
///
///
// Inspira6tion taken from playing the playstation game Saga Frontier.
// A random GUI coder ( you know who you are ) helped me figure out
// how to abrutly stop the display of a dummy model by changing the unit
// scale as you will see below.
scope oscillatingscream initializer I

globals
private constant integer OSI = 'A071',/*SpellID*/ODSI = 'A079'/*StunSpellID*/,ODI = 'e00Y'/*DummyID*/
private constant real rad = 600.00//radius of spell
private constant attacktype A_TYPE = FullAttack//attack type of damage dealt by oscillation
private constant damagetype D_TYPE = DAMAGE_TYPE_SONIC // Damage type of damage dealt by oscillation.
private constant weapontype W_TYPE = WEAPON_TYPE_WHOKNOWS  // Weapon type of damage dealt by oscillation.
private constant boolean spareally=true
endglobals 
private real Damage (integer lvl){return 15.00 + (10.00 * lvl)} // Damage dealt by oscillation times 7.
private boolean OS_Filter (){return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) \
and GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) == false}
//! textmacro oscdum
set d.dum = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
GetRandomReal(0.00,359.99))
call SetUnitScale(d.dum,5.0,5.0,5.0)
call SetUnitAbilityLevel(d.dummy,ODSI,d.lvl)
call IssueImmediateOrder(d.dummy,"stomp")
set d.ux=GetUnitX(d.cast)
set d.uy=GetUnitY(d.cast)
call TAF_UDP(d.cast,d.grp,d.ux,d.uy,rad,d.be,A_TYPE,D_TYPE,W_TYPE, Damage(d.lvl),spareally)
call UnitApplyTimedLife(d.dum, 'BTLF', 2.0)
//! endtextmacro
//! textmacro oscdumm
set d.dumm = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
GetRandomReal(0.00,359.99))
call SetUnitScale(d.dumm,5.0,5.0,5.0)
call SetUnitAbilityLevel(d.dummy,ODSI,d.lvl)
call IssueImmediateOrder(d.dummy,"stomp")
set d.ux=GetUnitX(d.cast)
set d.uy=GetUnitY(d.cast)
call TAF_UDP(d.cast,d.grp,d.ux,d.uy,rad,d.be,A_TYPE,D_TYPE,W_TYPE, Damage(d.lvl),spareally)
call UnitApplyTimedLife(d.dumm, 'BTLF', 2.0)
//! endtextmacro
private struct Data
unit cast
unit dum
unit dumm
unit dummy
group grp
integer lvl
integer orb
timer tim
real ux
real uy
boolexpr be
static method create takes unit cast returns Data
local Data d = Data.allocate()
local unit first = null
set d.cast = cast
set d.lvl = GetUnitAbilityLevel(d.cast, OSI)
set d.orb = 0
set d.tim = NewTimer()
set d.grp = CreateGroup()
set d.dum = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
GetRandomReal(0.00,359.99))
call SetUnitScale(d.dum,5.0,5.0,5.0)
set d.dummy = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
GetRandomReal(0.00,359.99))
call SetUnitScale(d.dummy,0.0,0.0,0.0)
call SetUnitAbilityLevel(d.dummy,ODSI,d.lvl)
call IssueImmediateOrder(d.dummy,"stomp")
set d.ux=GetUnitX(d.cast)
set d.uy=GetUnitY(d.cast)
set d.be = Filter(function OS_Filter)
call TAF_UDP(d.cast,d.grp,d.ux,d.uy,rad,d.be,A_TYPE,D_TYPE,W_TYPE, Damage(d.lvl),spareally)
call UnitApplyTimedLife(d.dum, 'BTLF', 2.0)
call UnitApplyTimedLife(d.dumm, 'BTLF', 2.0)
call SetTimerData(d.tim, d)
set first =null
return d
endmethod
method onDestroy takes nothing returns nothing
call RemoveUnit(.dummy)
call ReleaseTimer(.tim)
endmethod
endstruct
private function Callback takes nothing returns boolean
local timer tim = GetExpiredTimer()
local Data d = GetTimerData(tim)
set d.orb = d.orb + 1
if d.orb ==2 then
//! runtextmacro oscdumm()
elseif d.orb ==3 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==4 then
//! runtextmacro oscdum()
elseif d.orb ==5 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==6 then
//! runtextmacro oscdumm()
elseif d.orb ==7 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==8 then
//! runtextmacro oscdum()
elseif d.orb ==9 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==10 then
//! runtextmacro oscdumm()
elseif d.orb ==11 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==12 then
//! runtextmacro oscdum()
elseif d.orb ==13 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==15 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb >= 16 then 
call d.destroy()
endif
set tim = null
return false
endfunction
private function Actions takes nothing returns boolean
local Data d = Data.create(GetTriggerUnit())
call TimerStart(d.tim, 0.25, true, function Callback)
return false
endfunction
public function I takes nothing returns nothing
call GT_AddStartsEffectAction(function Actions, OSI)
endfunction
endscope


i know the spell may be much more complicated than it needs to be...
i made the spell quite a while ago... anyway i'm still pretty newb at spells and yet this one looks pretty darned good i would say as for what the final effect should look like...

but i'm open to suggestions but overall i'm trying to figure out what's theh deal with the filter and why it isn't working. btw i'm using cjass, so the code probably looks a little strange...and no i didn't cjass it ALL up...that might have been something of a waste of time...especially if it got too much cjass then you guys might not be able to read it...

i'm thinking maybe i shold just say, screw groups and use some unit arrays instead. they seem to be easier to deal with. opinions?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
but i'm open to suggestions but overall i'm trying to figure out what's theh deal with the filter and why it isn't working. btw i'm using cjass, so the code probably looks a little strange...and no i didn't cjass it ALL up...that might have been something of a waste of time...especially if it got too much cjass then you guys might not be able to read it...
:confused:
 

Romek

Super Moderator
Reaction score
963
You should start using the 'tab' key though to inline your code. It's horrible to read for that very reason (nothing to do with cJass). You also follow no apparent naming convention, and use ambiguous/meaningless variable names. These are basic coding practices you should learn, regardless of what language you want to use. It'll probably help you more than it'll help us, in any case.
The problem with cJass isn't that it's unreadable. We're not stupid.

Also:
JASS:
if condition then
else
   <Actions>
endif

// ->

if !condition then
    <Actions>
endif



What's [ljass]GetTriggerUnit()[/ljass] in this context?
 

NeuroToxin

New Member
Reaction score
46
JASS:
public function UDP takes unit damager, group uir, real px, real py, real rr, boolexpr fltr, attacktype at, damagetype dt, weapontype wt, real damage, boolean spareally returns integer
    local unit first = null
    local integer c =0
    call GroupEnumUnitsInRange(uir,px,py,rr,fltr)
    loop
        set first = FirstOfGroup(uir)
        exitwhen first == null
        call GroupRemoveUnit(uir,first)
        set c=c+1
        if spareally then
            if IsUnitAlly(first,GetOwningPlayer(damager)) then
            else
                call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
            endif
        else
            call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
        endif
    endloop
    set first = null
    return c
endfunction
///
///
///
// Inspira6tion taken from playing the playstation game Saga Frontier.
// A random GUI coder ( you know who you are ) helped me figure out
// how to abrutly stop the display of a dummy model by changing the unit
// scale as you will see below.
scope oscillatingscream initializer I

    globals
        private constant integer OSI = 'A071',/*SpellID*/ODSI = 'A079'/*StunSpellID*/,ODI = 'e00Y'/*DummyID*/
        private constant real rad = 600.00//radius of spell
        private constant attacktype A_TYPE = FullAttack//attack type of damage dealt by oscillation
        private constant damagetype D_TYPE = DAMAGE_TYPE_SONIC // Damage type of damage dealt by oscillation.
        private constant weapontype W_TYPE = WEAPON_TYPE_WHOKNOWS  // Weapon type of damage dealt by oscillation.
        private constant boolean spareally=true
    endglobals
    private real Damage (integer lvl){return 15.00 + (10.00 * lvl)} // Damage dealt by oscillation times 7.
    private boolean OS_Filter (){return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) \
    and GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) == false}
    //! textmacro oscdum
    set d.dum = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
    GetRandomReal(0.00,359.99))
    call SetUnitScale(d.dum,5.0,5.0,5.0)
    call SetUnitAbilityLevel(d.dummy,ODSI,d.lvl)
    call IssueImmediateOrder(d.dummy,"stomp")
    set d.ux=GetUnitX(d.cast)
    set d.uy=GetUnitY(d.cast)
    call TAF_UDP(d.cast,d.grp,d.ux,d.uy,rad,d.be,A_TYPE,D_TYPE,W_TYPE, Damage(d.lvl),spareally)
    call UnitApplyTimedLife(d.dum, 'BTLF', 2.0)
    //! endtextmacro
    //! textmacro oscdumm
    set d.dumm = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
    GetRandomReal(0.00,359.99))
    call SetUnitScale(d.dumm,5.0,5.0,5.0)
    call SetUnitAbilityLevel(d.dummy,ODSI,d.lvl)
    call IssueImmediateOrder(d.dummy,"stomp")
    set d.ux=GetUnitX(d.cast)
    set d.uy=GetUnitY(d.cast)
    call TAF_UDP(d.cast,d.grp,d.ux,d.uy,rad,d.be,A_TYPE,D_TYPE,W_TYPE, Damage(d.lvl),spareally)
    call UnitApplyTimedLife(d.dumm, 'BTLF', 2.0)
    //! endtextmacro
    private struct Data
        unit cast
        unit dum
        unit dumm
        unit dummy
        group grp
        integer lvl
        integer orb
        timer tim
        real ux
        real uy
        boolexpr be
        static method create takes unit cast returns Data
            local Data d = Data.allocate()
            local unit first = null
            set d.cast = cast
            set d.lvl = GetUnitAbilityLevel(d.cast, OSI)
            set d.orb = 0
            set d.tim = NewTimer()
            set d.grp = CreateGroup()
            set d.dum = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
            GetRandomReal(0.00,359.99))
            call SetUnitScale(d.dum,5.0,5.0,5.0)
            set d.dummy = CreateUnit(GetOwningPlayer(d.cast), ODI, GetUnitX(d.cast), GetUnitY(d.cast) - 125.00, \
            GetRandomReal(0.00,359.99))
            call SetUnitScale(d.dummy,0.0,0.0,0.0)
            call SetUnitAbilityLevel(d.dummy,ODSI,d.lvl)
            call IssueImmediateOrder(d.dummy,"stomp")
            set d.ux=GetUnitX(d.cast)
            set d.uy=GetUnitY(d.cast)
            set d.be = Filter(function OS_Filter)
            call TAF_UDP(d.cast,d.grp,d.ux,d.uy,rad,d.be,A_TYPE,D_TYPE,W_TYPE, Damage(d.lvl),spareally)
            call UnitApplyTimedLife(d.dum, 'BTLF', 2.0)
            call UnitApplyTimedLife(d.dumm, 'BTLF', 2.0)
            call SetTimerData(d.tim, d)
            set first =null
            return d
        endmethod
        method onDestroy takes nothing returns nothing
            call RemoveUnit(.dummy)
            call ReleaseTimer(.tim)
        endmethod
    endstruct
    private function Callback takes nothing returns boolean
        local timer tim = GetExpiredTimer()
        local Data d = GetTimerData(tim)
        set d.orb = d.orb + 1
        if d.orb ==2 then
            //! runtextmacro oscdumm()
        elseif d.orb ==3 then
            call SetUnitScale(d.dum,0.0,0.0,0.0)
        elseif d.orb ==4 then
            //! runtextmacro oscdum()
        elseif d.orb ==5 then
            call SetUnitScale(d.dumm,0.0,0.0,0.0)
        elseif d.orb ==6 then
            //! runtextmacro oscdumm()
        elseif d.orb ==7 then
            call SetUnitScale(d.dum,0.0,0.0,0.0)
        elseif d.orb ==8 then
            //! runtextmacro oscdum()
        elseif d.orb ==9 then
            call SetUnitScale(d.dumm,0.0,0.0,0.0)
        elseif d.orb ==10 then
            //! runtextmacro oscdumm()
        elseif d.orb ==11 then
            call SetUnitScale(d.dum,0.0,0.0,0.0)
        elseif d.orb ==12 then
            //! runtextmacro oscdum()
        elseif d.orb ==13 then
            call SetUnitScale(d.dumm,0.0,0.0,0.0)
        elseif d.orb ==15 then
            call SetUnitScale(d.dum,0.0,0.0,0.0)
        elseif d.orb >= 16 then
            call d.destroy()
        endif
        set tim = null
        return false
    endfunction
    private function Actions takes nothing returns boolean
        local Data d = Data.create(GetTriggerUnit())
        call TimerStart(d.tim, 0.25, true, function Callback)
        return false
    endfunction
    public function I takes nothing returns nothing
        call GT_AddStartsEffectAction(function Actions, OSI)
    endfunction
endscope

Heres the script aligned right.
 

SanKakU

Member
Reaction score
21

What's [ljass]GetTriggerUnit()[/ljass] in this context?

good question. i guess i should see if i can use a variable there. if not, maybe i have to set the boolean outside of the struct? :/ that sounds like bad idea...

You also follow no apparent naming convention, and use ambiguous/meaningless variable names.

naming conventions are for robots/perfectionists?

ambiguous/meaningless variable names? all of them have meaning, fool.
and they're not ambiguous at all. can't you imagine what they indicate? it's not hard.
people shouldn't have to put comments after every variable name for crying out loud.
Code:
unit cast//cast is for caster
unit dum//dum is for dummy
unit dumm//dumm is for dummy number 2
unit dummy//dummy is for dummy number 3
group grp//grp is for group
integer lvl//lvl is for level
integer orb//orb is for loop increment, it is basic noun so any name can go here
timer tim//tim is for timer
real ux//ux is for unit x, as in the coordinate
real uy//uy is for unit y, as in the coordinate
boolexpr be//be is for boolean expression
OSI = 'A071',//OSI is for oscillation spell ID
/*SpellID*/
ODSI = 'A079'//ODSI is for oscillatio dummy spell ID
/*StunSpellID*/,ODI = 'e00Y'//ODI is for oscillation dummy ID/*DummyID*/
private constant real rad = 600.00//radius of spell//ok there's explanations for every single variable pretty much, minus the struct variables.  since the struct variables are clearl  not hard to understand, i think it's you 
private constant attacktype A_TYPE = FullAttack//attack type of damage dealt by oscillation
private constant damagetype D_TYPE = DAMAGE_TYPE_SONIC // Damage type of damage dealt by oscillation.
private constant weapontype W_TYPE = WEAPON_TYPE_WHOKNOWS  // Weapon type of damage dealt by oscillation.
private constant boolean spareally=true
endglobals 
private real Damage (integer lvl){return 15.00 + (10.00 * lvl)} // Damage dealt by oscillation times 7.
private boolean OS_Filter (){return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) \
and GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitType(GetFilterUnit(),



ok let's look at the library function, since nothing is questionable about the spell's variables.

public function UDP takes unit damager//really?  damager is hard?
, group uir//the name of function is UDP means unit damage point so it's obvious this is units in range.
, real px//point x, as in the coordinates, 
real py//ditto, 
real rr//real radius blah blah..., 
boolexpr fltr//fltr is for filter obviously
, attacktype at, damagetype dt, weapontype wt//seriously go back to school if you don't know the concept of abbreviations
, real damage//doesn't get any more clear than this
, boolean spareally//really do i have to spell it out? returns integer
local unit first = null
local integer c =0//c is for count.  quite obvious
call GroupEnumUnitsInRange(uir,px,py,rr,fltr)
loop
set first = FirstOfGroup(uir)//got problem?
exitwhen first == null
call GroupRemoveUnit(uir,first)
set c=c+1
if spareally then
if IsUnitAlly(first,GetOwningPlayer(damager)) then
else
call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
endif
else
call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
endif
endloop
set first = null
return c
endfunction

thanks for the insightful question but try next time to not say such arbitrary remarks about the etiquette of my coding.
 

Romek

Super Moderator
Reaction score
963
> good question. i guess i should see if i can use a variable there. if not, maybe i have to set the boolean outside of the struct? :/ that sounds like bad idea...
Set a global unit to d.cast, and then use that instead of [ljass]GetTriggerUnit()[/ljass]. It'll still be MUI, since it's instant, and it should fix your problem.
 

Sevion

The DIY Ninja
Reaction score
413
Quick question, why are you coloring your text bright yellow when we all have white backgrounds?
 

NeuroToxin

New Member
Reaction score
46
good question. i guess i should see if i can use a variable there. if not, maybe i have to set the boolean outside of the struct? :/ that sounds like bad idea...



naming conventions are for robots/perfectionists?

ambiguous/meaningless variable names? all of them have meaning, fool.
and they're not ambiguous at all. can't you imagine what they indicate? it's not hard.
people shouldn't have to put comments after every variable name for crying out loud.
Code:
unit cast//cast is for caster
unit dum//dum is for dummy
unit dumm//dumm is for dummy number 2
unit dummy//dummy is for dummy number 3
group grp//grp is for group
integer lvl//lvl is for level
integer orb//orb is for loop increment, it is basic noun so any name can go here
timer tim//tim is for timer
real ux//ux is for unit x, as in the coordinate
real uy//uy is for unit y, as in the coordinate
boolexpr be//be is for boolean expression
OSI = 'A071',//OSI is for oscillation spell ID
/*SpellID*/
ODSI = 'A079'//ODSI is for oscillatio dummy spell ID
/*StunSpellID*/,ODI = 'e00Y'//ODI is for oscillation dummy ID/*DummyID*/
private constant real rad = 600.00//radius of spell//ok there's explanations for every single variable pretty much, minus the struct variables.  since the struct variables are clearl  not hard to understand, i think it's you 
private constant attacktype A_TYPE = FullAttack//attack type of damage dealt by oscillation
private constant damagetype D_TYPE = DAMAGE_TYPE_SONIC // Damage type of damage dealt by oscillation.
private constant weapontype W_TYPE = WEAPON_TYPE_WHOKNOWS  // Weapon type of damage dealt by oscillation.
private constant boolean spareally=true
endglobals 
private real Damage (integer lvl){return 15.00 + (10.00 * lvl)} // Damage dealt by oscillation times 7.
private boolean OS_Filter (){return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) \
and GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitType(GetFilterUnit(),



ok let's look at the library function, since nothing is questionable about the spell's variables.

public function UDP takes unit damager//really?  damager is hard?
, group uir//the name of function is UDP means unit damage point so it's obvious this is units in range.
, real px//point x, as in the coordinates, 
real py//ditto, 
real rr//real radius blah blah..., 
boolexpr fltr//fltr is for filter obviously
, attacktype at, damagetype dt, weapontype wt//seriously go back to school if you don't know the concept of abbreviations
, real damage//doesn't get any more clear than this
, boolean spareally//really do i have to spell it out? returns integer
local unit first = null
local integer c =0//c is for count.  quite obvious
call GroupEnumUnitsInRange(uir,px,py,rr,fltr)
loop
set first = FirstOfGroup(uir)//got problem?
exitwhen first == null
call GroupRemoveUnit(uir,first)
set c=c+1
if spareally then
if IsUnitAlly(first,GetOwningPlayer(damager)) then
else
call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
endif
else
call UnitDamageTarget(damager,first,damage,false,false,at,dt,wt)
endif
endloop
set first = null
return c
endfunction

thanks for the insightful question but try next time to not say such arbitrary remarks about the etiquette of my coding.

Buddy, I have one hint,
Shut. Up.

We're all trying to help you here, stop being so aggressive to everyone, or you'll be the ass of thehelper.net.

Next thing. Naming conventions do matter. Show anyone your code and they'll look at you like you're on drugs, just name them so other members can easily read your code, it also helps us read it more easily.

px, point x, that makes no freaking sense, Point X, Okay, what does that Point X reference to?
dum
dumm
dummy
Name them dummy1
dummy2
dummy3 or, make it a dummy[3] array.

Things matter, trust me. Functions should have a capital letter, private function UnitDamageTarget takes nothing returns nothing
locals are all lowercase
local unit u = GetTriggerUnit()
and constant globals are all uppercase, private constant integer SPELLID = 'A000'
Also, regular globals, are simply one uppercase, private integer Spell = 'A000'
 

SanKakU

Member
Reaction score
21
Quick question, why are you coloring your text bright yellow when we all have white backgrounds?
to make reading the text optional.

neurotoxin, romek apparently deleted my long description of what all the names of the variables were for. and i'm not going to retype that. suffice it to say, what i name my variables is none of your business. it's not like it makes one bit of difference in the long run considering that i posted the entire code so it's not like i took something out of context for you to be puzzled by.

romek, i'll try yout suggestion and report back if it worked. thanks. gotta run though so it's not like a five minute deal. somewhere to be.
 

Sevion

The DIY Ninja
Reaction score
413
So you choose between having us able to easily read your text and blinding us with bright colors?

Personally, I think Spoilers do a perfect job of hiding text.

I also want to point out one more thing:

naming conventions are for robots/perfectionists?

Do you even know why naming conventions were created?

Ever since a long, long time ago all I have ever seen you, SanKakU, do is ask for help and then flame anyone who tries to make your life easier.
 

Romek

Super Moderator
Reaction score
963
> neurotoxin, romek apparently deleted my long description of what all the names of the variables were for. and i'm not going to retype that.
...I didn't delete anything.

> what i name my variables is none of your business.
It is when we're the ones who have to look at the code.

> Ever since a long, long time ago all I have ever seen you, SanKakU, do is ask for help and then flame anyone who tries to make your life easier.
Well said. It's testing my patience.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
JASS:
It is when we're the ones who have to look at the code.

Never mind.
He will be doomed when he wants to edit the code later. :D
The code itself was terribly written.
JASS:
if d.orb ==2 then
//! runtextmacro oscdumm()
elseif d.orb ==3 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==4 then
//! runtextmacro oscdum()
elseif d.orb ==5 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==6 then
//! runtextmacro oscdumm()
elseif d.orb ==7 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==8 then
//! runtextmacro oscdum()
elseif d.orb ==9 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==10 then
//! runtextmacro oscdumm()
elseif d.orb ==11 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==12 then
//! runtextmacro oscdum()
elseif d.orb ==13 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==15 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb >= 16 then 
call d.destroy()
endif

Wait, does this make sense? :p
JASS:
if I2R(d.orb/2)==I2R(d.orb)/I2R(2) then
    //! runtextmacro oscdumm()
else
    //! runtextmacro oscdum()
endif
//Returns true if the value can be divided by 2 without leaving decimals.
//Remember to paste the code into the if block.
//Supports up arbitrary number <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />
 

SanKakU

Member
Reaction score
21
It is though, because you're asking for our help, and you give us chicken scratch.
it's not true and you know it.
...it's just as well i don't participate in your hero contest. with this kind of attitude, it's obviously a waste of effort to even try.
Sevion, you have a history of being an idiot. I don't care what you have to say.

you should not be so discriminatory.
 

SanKakU

Member
Reaction score
21
JASS:
It is when we&#039;re the ones who have to look at the code.

Never mind.
He will be doomed when he wants to edit the code later. :D
The code itself was terribly written.
JASS:
if d.orb ==2 then
//! runtextmacro oscdumm()
elseif d.orb ==3 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==4 then
//! runtextmacro oscdum()
elseif d.orb ==5 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==6 then
//! runtextmacro oscdumm()
elseif d.orb ==7 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==8 then
//! runtextmacro oscdum()
elseif d.orb ==9 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==10 then
//! runtextmacro oscdumm()
elseif d.orb ==11 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==12 then
//! runtextmacro oscdum()
elseif d.orb ==13 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==15 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb &gt;= 16 then 
call d.destroy()
endif

Wait, does this make sense? :p
JASS:
if I2R(d.orb/2)==I2R(d.orb)/I2R(2) then
    //! runtextmacro oscdumm()
else
    //! runtextmacro oscdum()
endif
//Returns true if the value can be divided by 2 without leaving decimals.
//Remember to paste the code into the if block.
//Supports up arbitrary number <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />

lol i admit freely that i'm very bad at graphics. even still, this was a long time ago. if you want to examine something of higher quality, i suggest you look at the magnetic field graphical enhancement i wrote up in the spells section. look all i wanted help with was the filter. so don't go harrassing me for something such that is unspecified, meaning that it might as well be imaginary. i mean, really.

romek, i realized after i posted that you must've default colored my text. you know, the polite thing would've been to edit the colored text to a different color, rather than defaulting it to regular font. you confused me.

look, if you exaggerate about something, i have the tenacity to call you a liar for it. so don't do it. it's pretty damned simple, romek. and then your pals decide to vaguely assert wild accusations and i flame them as well. you're the one starting the fight. not me.

edit:
oh i didn't see this.
JASS:
if I2R(d.orb/2)==I2R(d.orb)/I2R(2) then
    //! runtextmacro oscdumm()
else
    //! runtextmacro oscdum()
endif
//Returns true if the value can be divided by 2 without leaving decimals.
//Remember to paste the code into the if block.
//Supports up arbitrary number <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />

looks like good idea. will try it. thanks.
 

Sevion

The DIY Ninja
Reaction score
413
As far as I can see, it seems the first to start flinging names at other people and flaming is you...

Yes, I have a history of being an idiot. I'm an idiot who uses (mostly) correct grammar and capitalization. At least I know how to indent correctly and my code is actually legible.

By the way, you should try not to double post. It's bm.

Why can't you just take our advice and write indented code with good naming convention? Seriously, who wants to actually read:

JASS:
if d.orb ==2 then
//! runtextmacro oscdumm()
elseif d.orb ==3 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==4 then
//! runtextmacro oscdum()
elseif d.orb ==5 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==6 then
//! runtextmacro oscdumm()
elseif d.orb ==7 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==8 then
//! runtextmacro oscdum()
elseif d.orb ==9 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==10 then
//! runtextmacro oscdumm()
elseif d.orb ==11 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb ==12 then
//! runtextmacro oscdum()
elseif d.orb ==13 then
call SetUnitScale(d.dumm,0.0,0.0,0.0)
elseif d.orb ==15 then
call SetUnitScale(d.dum,0.0,0.0,0.0)
elseif d.orb &gt;= 16 then 
call d.destroy()
endif


No one knows what those textmacros except you and who wants to continuously look around for the definitions? The code is damned terrible to read and you make no efforts to make it easier on us who are trying to make it easier on you.

It's like if I posted a help thread in Arabic and actually expected people to answer my question. And if they ask me to write it in English on this English-speaking forum, I'd flame them for having histories of being idiots.

In the end, it comes down to this: Why are you being such a troll?
 

NeuroToxin

New Member
Reaction score
46
lol i admit freely that i'm very bad at graphics. even still, this was a long time ago. if you want to examine something of higher quality, i suggest you look at the magnetic field graphical enhancement i wrote up in the spells section. look all i wanted help with was the filter. so don't go harrassing me for something such that is unspecified, meaning that it might as well be imaginary. i mean, really.

romek, i realized after i posted that you must've default colored my text. you know, the polite thing would've been to edit the colored text to a different color, rather than defaulting it to regular font. you confused me.

look, if you exaggerate about something, i have the tenacity to call you a liar for it. so don't do it. it's pretty damned simple, romek. and then your pals decide to vaguely assert wild accusations and i flame them as well. you're the one starting the fight. not me.

edit:
oh i didn't see this.
JASS:
if I2R(d.orb/2)==I2R(d.orb)/I2R(2) then
    //! runtextmacro oscdumm()
else
    //! runtextmacro oscdum()
endif
//Returns true if the value can be divided by 2 without leaving decimals.
//Remember to paste the code into the if block.
//Supports up arbitrary number <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />

looks like good idea. will try it. thanks.

I'm tired of your shit. As Sevion said above, you're nothing but a troll. Get a nicer attitude then ask for our help. Also, Romek didn't do shit to your posts, you just don't know what you're doing. OH! And guess what! His name is Romek, not romek, Respect your seniors, once again.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top