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 > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 08-30-2010, 01:16 PM   #46
Bribe
User
 
Bribe's Avatar
 
Join Date: Mar 2010
Posts: 233

Submissions (1)

Bribe will become famous soon enough (30)Bribe will become famous soon enough (30)

Send a message via AIM to Bribe
Default

Collapse JASS:
function AbilityRangePreload takes integer start, integer end returns nothing
    local integer i = 1
        if start > end then
            set i = -1
        endif
        loop
            exitwhen start > end
            call UnitAddAbility(PreloadUnit, start)
            set start = start + i
        endloop
endfunction

I don't know what you intended to do with that integer i, but in its current state this whole function should just retain the loop alone and yet do the exact same thing;

Collapse JASS:
function AbilityRangePreload takes integer start, integer end returns nothing
    loop
        exitwhen start > end
        call UnitAddAbility(PreloadUnit, start)
        set start = start + 1
    endloop
endfunction

Perhaps you meant to do this?:

Collapse JASS:
function AbilityRangePreload takes integer start, integer end returns nothing
    local integer i = 1
    if (start > end) then
        set i = -1
    endif
    loop
        call UnitAddAbility(PreloadUnit, start)
        exitwhen start == end
        set start = start + i
    endloop
endfunction

Last edited by Bribe : 08-30-2010 at 01:23 PM.
Bribe is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
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 08:53 AM.


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