wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 09-24-2007, 06:23 AM   #1
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,523

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default CSCache's Dynamic Arrays Hate My Spell

Spell Code

Relevent parts are highlighted.
Collapse JASS:
//*****************************************************************************************\\
//                            Spell Name: Chains of Solidarity                             \\
//                                 Spell Author: Pyrogasm                                  \\
//                                                                                         \\
//                                Follows the JESP Standard                                \\
//*****************************************************************************************\\

constant function ChainsOfSolidarity_AbilityId takes nothing returns integer
    return 'A000' //Rawcode of the spell itself
endfunction

constant function ChainsOfSolidarity_DummyUnitId takes nothing returns integer
    return 'h000' //This unit MUST have a "cast backswing point" of 0.00
endfunction       //And CANNOT have negative regeneration

constant function ChainsOfSolidarity_DummyLightningSpellId takes nothing returns integer
    return 'A001' //The "CoS Dummy Lightning spell" determines the lightning effect
endfunction

constant function ChainsOfSolidarity_DummyBuffSpellId takes nothing returns integer
    return 'A002' //The "CoS Dummy Buff Spell" spell
endfunction

constant function ChainsOfSolidarity_BuffId takes nothing returns integer
    return 'B000' //The "Chains of Solidarity (Buff)" buff
endfunction

constant function ChainsOfSolidarity_CrowFormAbilityId takes nothing returns integer
    return 'Amrf' //Medivh's Crow form ability; you don't need to change this rawcode unless
endfunction       //you modified it in your map. If you have, copy it, reset the copied one,
                  //and use its rawcode here.

constant function ChainsOfSolidarity_BreakDistance takes integer Level returns real
    return 1500.00 //If the two units are farther than this distance apart, the spell
endfunction        //Will end.

constant function ChainsOfSolidarity_DummyFlyHeight takes integer Level returns real
    return 30.00 //If you want the lightning effect on the caster to be higher or lower.
endfunction      //It will always go directly to the target.

constant function ChainsOfSolidarity_Duration takes integer Level returns real
    return 10.00 + (1.00*Level) //Duration of the lightning effect is changed in the Object Editor
endfunction

constant function ChainsOfSolidarity_HealthPerSecond takes integer Level returns real
    return 20.00 + (15.00*Level) //In Health per Second
endfunction

constant function ChainsOfSolidarity_LineWidth takes integer Level returns real
    return 145.00 //Distance from center to outer edge of line
endfunction

constant function ChainsOfSolidarity_CircleOptions takes integer Level returns integer
     return 3 //0 = no circles; 1 = only around target; 2 = only around caster; 3 = around both
endfunction

constant function ChainsOfSolidarity_CircleRadius takes integer Level, integer WhichCircle returns real
     if WhichCircle == 1 then     //Radius of the circle(s) around the caster/target
         return 75.00             //This might conceivably be the same as the LineWidth.
     elseif WhichCircle == 2 then //To make it only affect the caster/target, simply put 10.00
         return 75.00             //Or something.
     endif
     return 0.00                  //Just a safety return; don't change this
endfunction

constant function ChainsOfSolidarity_MinHeight takes integer Level returns real
    return 0.00 //No units below this height will be affected
endfunction

constant function ChainsOfSolidarity_MaxHeight takes integer Level returns real
    return 500.00 //No units above this height will be affected
endfunction

constant function ChainsOfSolidarity_TimerInterval takes integer Level returns real
    return 0.04 //Interval that the timer runs at; this affects the lightning effect
endfunction

constant function ChainsOfSolidarity_HealAllies takes integer Level returns boolean
    return true
endfunction

constant function ChainsOfSolidarity_HealEnemies takes integer Level returns boolean
    return false
endfunction

constant function ChainsOfSolidarity_HealOnCast takes integer Level returns boolean
    return false
endfunction

constant function ChainsOfSolidarity_EffectPath takes nothing returns string
    return "Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl"
endfunction

constant function ChainsOfSolidarity_EffectAttach takes nothing returns string
    return "chest"
endfunction

constant function ChainsOfSolidarity_EffectInterval takes nothing returns real
    return 0.48 //This should probably be a multiple of the timer interval
endfunction



//*****************************************************************************************\\
//                                Start External Functions                                 \\
//*****************************************************************************************\\

//=============================
// Function by grim001
//=============================
function ChainsOfSolidarity_GroupEnumUnitsInQuad takes group g, real x1, real y1, real x2, real y2, real x3, real y3, real x4, real y4, real minHeight, real maxHeight, boolexpr f returns nothing
    local real maxx
    local real minx
    local real maxy
    local real miny
    local unit u
    local real ux
    local real uy
    local group g2 = CreateGroup()
    local rect r

    if x1 >= x2 and x1 >= x3 and x1 >= x4 then
        set maxx = x1
    elseif x2 >= x1 and x2 >= x3 and x2 >= x4 then
        set maxx = x2
    elseif x3 >= x1 and x3 >= x2 and x3 >= x4 then
        set maxx = x3
    else
        set maxx = x4
    endif

    if x1 <= x2 and x1 <= x3 and x1 <= x4 then
        set minx = x1
    elseif x2 <= x1 and x2 <= x3 and x2 <= x4 then
        set minx = x2
    elseif x3 <= x1 and x3 <= x2 and x3 <= x4 then
        set minx = x3
    else
        set minx = x4
    endif

    if y1 >= y2 and y1 >= y3 and y1 >= y4 then
        set maxy = y1
    elseif y2 >= y1 and y2 >= y3 and y2 >= y4 then
        set maxy = y2
    elseif y3 >= y1 and y3 >= y2 and y3 >= y4 then
        set maxy = y3
    else
        set maxy = y4
    endif

    if y1 <= y2 and y1 <= y3 and y1 <= y4 then
        set miny = y1
    elseif y2 <= y1 and y2 <= y3 and y2 <= y4 then
        set miny = y2
    elseif y3 <= y1 and y3 <= y2 and y3 <= y4 then
        set miny = y3
    else
        set miny = y4
    endif

    set r = Rect(minx, miny, maxx, maxy)
    call GroupEnumUnitsInRect(g2, r, f)
    loop
        set u = FirstOfGroup(g2)
        exitwhen u == null
        call GroupRemoveUnit(g2, u)
        if GetUnitFlyHeight(u) <= maxHeight and GetUnitFlyHeight(u) >= minHeight then
            set ux = GetUnitX(u)
            set uy = GetUnitY(u)
            if (uy - y1)*(x2 - x1) - (ux - x1)*(y2 - y1) <= 0. then
                if (uy - y2)*(x3 - x2) - (ux - x2)*(y3 - y2) <= 0. then
                    if (uy - y3)*(x4 - x3) - (ux - x3)*(y4 - y3) <= 0. then
                        if (uy - y4)*(x1 - x4) - (ux - x4)*(y1 - y4) <= 0. then
                            call GroupAddUnit(g, u)
                        endif
                    endif
                endif
            endif
        endif
    endloop
    call DestroyGroup(g2)
    call RemoveRect(r)
    set g2 = null
    set r = null
endfunction
//*****************************************************************************************\\
//                                 End External Functions                                  \\
//*****************************************************************************************\\


function ChainsOfSolidarity_CastConditions takes nothing returns boolean
    return GetSpellAbilityId() == ChainsOfSolidarity_AbilityId()
endfunction

function ChainsOfSolidarity_HealFilter takes nothing returns boolean
    local unit U = GetFilterUnit()
    local boolean Ally = bj_slotControlUsed[95] and IsUnitAlly(U, bj_forceRandomCurrentPick)
    local boolean Enemy = bj_slotControlUsed[96] and IsUnitEnemy(U, bj_forceRandomCurrentPick)
    set U = null
    return Ally or Enemy
endfunction

function ChainsOfSolidarity_Callback takes nothing returns nothing
    local timer T = GetExpiredTimer()
    local integer ArrayIndex = GetCSData(T)
    local unit U = GetArrayUnit(ArrayIndex, 1)
    local unit U2 = GetArrayUnit(ArrayIndex, 2)
    local integer Level = GetArrayInt(ArrayIndex, 4)
    local real X = GetUnitX(U)
    local real Y = GetUnitY(U)
    local real X2 = GetUnitX(U2)
    local real Y2 = GetUnitY(U2)
    local unit Dummy = GetArrayUnit(ArrayIndex, 3)
    local real Duration = ChainsOfSolidarity_Duration(Level)
    local real TimerInterval = ChainsOfSolidarity_TimerInterval(Level)
    local group G
    local unit U3
    local real HealAmount
    local real Angle = ChainsOfSolidarity_BreakDistance(Level)
    local real Width
    local string EffectPath
    local string EffectAttach
    local real Elapsed = GetArrayReal(ArrayIndex, 5)
    local boolean Effects
    local integer CircleOptions
    local group G2

    local real Side1X
    local real Side1Y
    local real Side2X
    local real Side2Y
    local real RX1
    local real RY1
    local real RX2
    local real RY2
    local real RX3
    local real RY3
    local real RX4
    local real RY4

    call BJDebugMsg("ArrayIndex: "+I2S(ArrayIndex))

    if Elapsed > Duration or GetWidgetLife(U) < 0.406 or GetWidgetLife(U2) < 0.406 or (X-X2)*(X-X2)+(Y-Y2)*(Y-Y2) > Angle*Angle then
        set Level = ChainsOfSolidarity_BuffId()
        call RemoveUnit(Dummy)
        call UnitRemoveAbility(U, Level)
        call UnitRemoveAbility(U2, Level)

        call PauseTimer(T)
        call DestroyArray(ArrayIndex)
        call DestroyTimer(T)
    else
        call SetArrayReal(ArrayIndex, 5, Elapsed+TimerInterval)
        set Width = ChainsOfSolidarity_LineWidth(Level)
        set HealAmount = ChainsOfSolidarity_HealthPerSecond(Level)*TimerInterval
        set CircleOptions = ChainsOfSolidarity_CircleOptions(Level)
        set Effects = ModuloReal(Elapsed, ChainsOfSolidarity_EffectInterval()) <= TimerInterval
        if Effects then
            set EffectPath = ChainsOfSolidarity_EffectPath()
            set EffectAttach = ChainsOfSolidarity_EffectAttach()
        endif

        call SetUnitX(Dummy, X)
        call SetUnitY(Dummy, Y)
        set Angle = Atan2((Y2-Y),(X2-X))

        set Side1X = X2 - X
        set Side1Y = Y2 - Y
        set Side2X = Width*Cos(Angle-1.5708)
        set Side2Y = Width*Sin(Angle-1.5708)

        set RX4 = X + Side2X*0.5
        set RY4 = Y + Side2Y*0.5
        set RX3 = RX4 + Side1X
        set RY3 = RY4 + Side1Y
        set RX2 = RX3 - Side2X
        set RY2 = RY3 - Side2Y
        set RX1 = RX2 - Side1X
        set RY1 = RY2 - Side1Y

        set bj_slotControlUsed[95] = ChainsOfSolidarity_HealAllies(Level)
        set bj_slotControlUsed[96] = ChainsOfSolidarity_HealEnemies(Level)
        set bj_forceRandomCurrentPick = GetOwningPlayer(U)
        set G = CreateGroup()
        call ChainsOfSolidarity_GroupEnumUnitsInQuad(G, RX1, RY1, RX2, RY2, RX3, RY3, RX4, RY4, ChainsOfSolidarity_MinHeight(Level), ChainsOfSolidarity_MaxHeight(Level), Condition(function ChainsOfSolidarity_HealFilter))

        if CircleOptions > 0 then
            set G2 = CreateGroup()
            set bj_groupAddGroupDest = G
            if CircleOptions == 1 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X2, Y2, ChainsOfSolidarity_CircleRadius(Level, 1), Condition(function ChainsOfSolidarity_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
                call GroupClear(G2)
            endif
            if CircleOptions == 2 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X, Y, ChainsOfSolidarity_CircleRadius(Level, 2), Condition(function ChainsOfSolidarity_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
            endif
            call DestroyGroup(G2)
            set G2 = null
        endif

        loop
            set U3 = FirstOfGroup(G)
            exitwhen U3 == null

            call SetWidgetLife(U3, GetWidgetLife(U3)+HealAmount)
            if Effects then
                call DestroyEffect(AddSpecialEffectTarget(EffectPath, U3, EffectAttach))
            endif

            call GroupRemoveUnit(G, U3)
        endloop

        call DestroyGroup(G)
        set G = null
    endif

    set U = null
    set U2 = null
    set Dummy = null
    set T = null
endfunction

function ChainsOfSolidarity_Cast takes nothing returns nothing
    local unit U = GetTriggerUnit()
    local unit U2 = GetSpellTargetUnit()
    local integer Level = GetUnitAbilityLevel(U, ChainsOfSolidarity_AbilityId())
    local real X = GetUnitX(U)
    local real Y = GetUnitY(U)
    local real X2
    local real Y2
    local integer DummySpellId = ChainsOfSolidarity_DummyLightningSpellId()
    local unit Dummy
    local real Duration = ChainsOfSolidarity_Duration(Level)
    local real TimerInterval = ChainsOfSolidarity_TimerInterval(Level)
    local group G
    local unit U3
    local timer T = CreateTimer()
    local real HealAmount
    local real Angle
    local real Width
    local string EffectPath
    local string EffectAttach
    local integer CircleOptions
    local group G2
    local integer ArrayIndex = NewArray(5, true)

    local real Side1X
    local real Side1Y
    local real Side2X
    local real Side2Y
    local real RX1
    local real RY1
    local real RX2
    local real RY2
    local real RX3
    local real RY3
    local real RX4
    local real RY4

    call BJDebugMsg("Cast")
    call BJDebugMsg("ArrayIndex: "+I2S(ArrayIndex))

    set bj_forceRandomCurrentPick = GetOwningPlayer(U)
    set Dummy = CreateUnit(bj_forceRandomCurrentPick, ChainsOfSolidarity_DummyUnitId(), X, Y, 0.00)
    call UnitAddAbility(Dummy, DummySpellId)
    call SetUnitAbilityLevel(Dummy, DummySpellId, Level)
    call IssueTargetOrder(Dummy, "fingerofdeath", U2)
    call UnitApplyTimedLife(Dummy, 'BTLF', Duration+TimerInterval)

    call SetArrayObject(ArrayIndex, 1, U)
    call SetArrayObject(ArrayIndex, 2, U2)
    call SetArrayObject(ArrayIndex, 3, Dummy)
    call SetArrayInt(ArrayIndex, 4, Level)
    call SetCSData(T, ArrayIndex)

    set DummySpellId = ChainsOfSolidarity_CrowFormAbilityId()
    call UnitAddAbility(Dummy, DummySpellId)
    call UnitRemoveAbility(Dummy, DummySpellId)
    call SetUnitFlyHeight(Dummy, ChainsOfSolidarity_DummyFlyHeight(Level), 10000.00)

    set DummySpellId = ChainsOfSolidarity_DummyBuffSpellId()
    set Dummy = CreateUnit(bj_forceRandomCurrentPick, ChainsOfSolidarity_DummyUnitId(), X, Y, 0.00)
    call UnitAddAbility(Dummy, DummySpellId)
    call SetUnitAbilityLevel(Dummy, DummySpellId, Level)
    call IssueTargetOrder(Dummy, "unholyfrenzy", U)
    call IssueTargetOrder(Dummy, "unholyfrenzy", U2)
    call UnitApplyTimedLife(Dummy, 'BTLF', 1.00)

    if ChainsOfSolidarity_HealOnCast(Level) then
        set HealAmount = ChainsOfSolidarity_HealthPerSecond(Level)*TimerInterval
        set Width = ChainsOfSolidarity_LineWidth(Level)
        set EffectPath = ChainsOfSolidarity_EffectPath()
        set EffectAttach = ChainsOfSolidarity_EffectAttach()
        set CircleOptions = ChainsOfSolidarity_CircleOptions(Level)

        set X2 = GetUnitX(U2)
        set Y2 = GetUnitY(U2)
        set Angle = Atan2((Y2-Y),(X2-X))

        set Side1X = X2 - X
        set Side1Y = Y2 - Y
        set Side2X = Width*Cos(Angle-1.5708)
        set Side2Y = Width*Sin(Angle-1.5708)

        set RX1 = X + Side2X*0.5
        set RY1 = Y + Side2Y*0.5
        set RX2 = RX1 + Side1X
        set RY2 = RY1 + Side1Y
        set RX3 = RX2 - Side2X
        set RY3 = RY2 - Side2Y
        set RX4 = RX3 - Side1X
        set RY4 = RY3 - Side1Y

        set bj_slotControlUsed[95] = ChainsOfSolidarity_HealAllies(Level)
        set bj_slotControlUsed[96] = ChainsOfSolidarity_HealEnemies(Level)
        set G = CreateGroup()
        call ChainsOfSolidarity_GroupEnumUnitsInQuad(G, RX1, RY1, RX2, RY2, RX3, RY3, RX4, RY4, ChainsOfSolidarity_MinHeight(Level), ChainsOfSolidarity_MaxHeight(Level), Condition(function ChainsOfSolidarity_HealFilter))

        if CircleOptions > 0 then
            set G2 = CreateGroup()
            set bj_groupAddGroupDest = G
            if CircleOptions == 1 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X2, Y2, ChainsOfSolidarity_CircleRadius(Level, 1), Condition(function ChainsOfSolidarity_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
                call GroupClear(G2)
            endif
            if CircleOptions == 2 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X, Y, ChainsOfSolidarity_CircleRadius(Level, 2), Condition(function ChainsOfSolidarity_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
            endif
            call DestroyGroup(G2)
            set G2 = null
        endif

        loop
            set U3 = FirstOfGroup(G)
            exitwhen U3 == null

            call SetWidgetLife(U3, GetWidgetLife(U3)+HealAmount)
            call DestroyEffect(AddSpecialEffectTarget(EffectPath, U3, EffectAttach))

            call GroupRemoveUnit(G, U3)
        endloop

        call DestroyGroup(G)
        set G = null
    endif

    call TimerStart(T, TimerInterval, true, function ChainsOfSolidarity_Callback)

    set U = null
    set U2 = null
    set Dummy = null
    set T = null
endfunction

//===========================================================================
function InitTrig_ChainsOfSolidarity takes nothing returns nothing
    set gg_trg_ChainsOfSolidarity = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_ChainsOfSolidarity, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_ChainsOfSolidarity, Condition(function ChainsOfSolidarity_CastConditions))
    call TriggerAddAction(gg_trg_ChainsOfSolidarity, function ChainsOfSolidarity_Cast)

    call Preload(ChainsOfSolidarity_EffectPath())
endfunction



I've found a severe problem the above spell I'm making regarding CSCache's Dynamic arrays. When allocating a new array on the first two casts of the spell, all is well. The first cast displays the message "ArrayIndex: 2" multiple times as it should; the second cast displays the message "ArrayIndex: 3" many times (though I don't see why it's not 2 as I'm destroying the arrays properly).

On the third cast, however, it starts to say that the array index is random number in excess of 1049000 (it was 1049055 on my most recent test) and the callback only runs once. Each subsequent cast increases this index number by some constant value (the value is different each time I test, but the difference between the numbers allocated for cast N and cast N+1 is always the same for that test of the map) usually around 1048914.

Once this index reaches around 2147425787 (how I tested this is explained later), the index becomes negative, usually about the number -2146492601 and then continues on increasing by that constant amount. Once the index gets to be around 0 (it never goes back to 0; it's usually around 300 or so) the whole cycle starts over again until the number reaches that high maxiumum and goes back to that negative number, etc., except the numbers aren't the same.


To see if it was simply this spell that was fucking with the array indexes, I devised this simple test:
Collapse JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    local integer Index
    local integer I = 0

    loop
        set I = I+1
        exitwhen I>10
        set Index = NewArray(5, true)
        call BJDebugMsg(I2S(Index))
        call DestroyArray(Index)
    endloop

    call BJDebugMsg(" ")

    set I = 0
    loop
        set I = I+1
        exitwhen I>10
        set Index = NewArray(5, true)
        call BJDebugMsg(I2S(Index))
        call DestroyArray(Index)
    endloop
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterPlayerEventEndCinematic( gg_trg_Untitled_Trigger_001, Player(5) )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

Continually pressing the escape key does nothing except display the number "2" over and over again as it should. However, after the 2nd cast of the ability, even this test starts to get wonky and follow the above mentioned pattern, allowing me to find the maximum and minimum that the numbers will go to.

One final thing to note that I just discovered is this: if I run my escape-press test in the middle of the first cast, the timer callback just halts and the following text is displayed:
3
3
3
3
3
3
3
3
3
3

3
3
3
3
3
3
3
3
3
3
ArrayIndex: 2

So, where did I go wrong to screw up CSCache's Dynamic arrays so badly? A testmap is uploaded below should someone feel the need to test it.
Attached Files
File Type: w3x Chains of Solidarity v1.20.w3x (81.5 KB, 12 views)
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.

Last edited by Pyrogasm : 09-24-2007 at 07:06 AM.
Pyrogasm is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-25-2007, 10:01 AM   #2
blu_da_noob
Nonchalant
 
blu_da_noob's Avatar


Respected User
 
Join Date: Mar 2006
Posts: 1,933

Submissions (2)

blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)

[Quicksilver #2] - 2nd Place[Quicksilver#1] 1st place

Send a message via MSN to blu_da_noob
Default

Set you array size to an arbitrary integer greater than 5. Profit. :)

I wasn't ever sure if dynamic arrays used zero- or one- based indexing. Now we know. The highest slot you should be accessing for a size N array is N-1. Accessing out of that bound seems to break the system.
__________________
blu_da_noob is offline   Reply With Quote
Old 09-26-2007, 06:29 AM   #3
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,523

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Orly? I'll try setting the size as 6, then.

Well that was dumb. Why doesn't the CSCache documentation say to do that?
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.

Last edited by Pyrogasm : 09-26-2007 at 08:28 AM.
Pyrogasm is offline   Reply With Quote
Old 09-26-2007, 10:40 PM   #4
botanic
User
 
botanic's Avatar
 
Join Date: Feb 2007
Posts: 551

Submissions (2)

botanic will become famous soon enough (41)botanic will become famous soon enough (41)

Send a message via AIM to botanic
Default

um... well that is odd gj tho I was stumped :P +rep blue
__________________
Quote:
Originally Posted by cohadar
I really should not be the one telling you this
Quote:
Originally Posted by botanic
I think we established that
botanic is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:18 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services