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 04-02-2008, 07:15 PM   #31
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

Why isn't the TriggerDestroy bug in here? People apparently had a really hard time thanks to that one. I hit into it myself, a little bit.

Collapse JASS:
//Place in trigger called TriggerDestroy Bug and type "-bug"

///Exploits the bug
function CauseBugHelper takes nothing returns nothing
    call BJDebugMsg("Running Test")
    call DestroyTrigger(GetTriggeringTrigger())
    call TriggerSleepAction(0)
    call TriggerSleepAction(0) //both waits are needed
    if CreateGroup() == CreateGroup() then
        call BJDebugMsg("|cFFFF0000Bug Caught|r")
    else
        call BJDebugMsg("|cFF00FF00No Bug Caught|r")
    endif
endfunction

///Creates a trigger to bug, then calls it
///Note that calling the created trigger normally (timers or TriggerExecute) doesn't bug out
function CauseBug takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerAddAction(t, function CauseBugHelper)
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH) //indirect call by death
    call UnitApplyTimedLife(CreateUnit(Player(0), 'hfoo', 0, 0, 0), 'BTLF', 0.01)
    set t = null
    call BJDebugMsg("Setup Complete")
endfunction

function InitTrig_TriggerDestroy_Bug takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerAddAction(t, function CauseBug)
    call TriggerRegisterPlayerChatEvent(t, Player(0), "-bug", true)
endfunction

*edit* knocked off a bunch of lines and removed the ExecuteFunc call, since it's not needed.
__________________
Don't pay attention to this signature, it's self-contradictory.

Last edited by Strilanc : 04-02-2008 at 08:32 PM.
Strilanc is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-03-2008, 06:35 AM   #32
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


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

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

Maybe you should explain this bug. Is it the handle-stack corruption one?

Edit: I have a bug of my own to add:
The function I2Code (a subset of the H2I-return bug stuff) does not work properly and may return erroneous things; instead, you need to add a helper function that converts the code to a real code to avoid bugs:
Collapse JASS:
function H2I takes handle h returns integer //Just fine when used with "code"s
    return h
    return 0
endfunction

function I2Code_Helper takes code c returns code
    return c
endfunction

function I2Code_Helper2 takes integer i returns code
    return i
    return null
endfunction

function I2Code takes integer i returns code
    return I2Code_Helper(I2Code_Helper2(i))
endfunction
Or at least I think that's right...
__________________
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 : 04-03-2008 at 06:40 AM.
Pyrogasm is offline   Reply With Quote
Old 04-03-2008, 02:08 PM   #33
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

Quote:
Originally Posted by Pyrogasm
Maybe you should explain this bug. Is it the handle-stack corruption one?

Yes that's the one.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 04-12-2008, 06:17 PM   #34
chobibo
100% Genuine Retard!
 
chobibo's Avatar
 
Join Date: Jan 2007
Posts: 796

chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)

Send a message via Yahoo to chobibo
Default

Using TriggerSleepAction inside timer function callbacks halts the functions execution.
chobibo is offline   Reply With Quote
Old 08-29-2008, 07:37 PM   #35
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Also found a weird one:

UnitRemoveAbility seems to unset GetSpellAbilityUnit().

I tried this:

Collapse JASS:
call UnitRemoveAbility(GetSpellAbilityUnit(),'A001')
call UnitAddAbility(GetSpellAbilityUnit(),'A002')

'A002' was never added. I tried several things, but then, after saving GetSpellAbilityUnit() in a local variable all worked fine! I haven't tested further, what GetSpellAbilityUnit() points to after a call of UnitRemoveAbility, but it was not the same unit as before.
gekko is offline   Reply With Quote
Old 08-29-2008, 08:17 PM   #36
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Are you sure there weren't any waits involved?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-30-2008, 02:46 AM   #37
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by Vexorian
Are you sure there weren't any waits involved?
yes, these two lines are from my code. And it was unusable like that. Maybe the bug only appears in certain situations, but I was not able to add the second ability before I saved GetSpellAbilityUnit() in a local var and used this one on the second call.

Edit: The attached map shows the bug: A000 should be removed and A001 should be added, but A001 aint there after clicking A000!
Attached Files
File Type: w3x bug.w3x (16.2 KB, 2 views)

Last edited by gekko : 08-30-2008 at 02:53 AM.
gekko is offline   Reply With Quote
Old 01-24-2009, 10:42 AM   #38
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (130)

Default

UnitId2String always returns null when you load a saved game, same for UnitId2String and OrderId2String, and AbilityId2String doesn't work at all.

Quote:
Originally Posted by common.j
// Not currently working correctly...
constant native AbilityId takes string abilityIdString returns integer
constant native AbilityId2String takes integer abilityId returns string

Added a demo map.

Note that i display the strings only for point orders and train orders, but it is the same with all other immediate orders and target orders, feel free to test it yourself.
Attached Files
File Type: w3x test strings.w3x (16.6 KB, 7 views)
__________________
Cool != Useful

Last edited by Troll-Brain : 01-24-2009 at 07:37 PM.
Troll-Brain is offline   Reply With Quote
Old 06-23-2009, 07:52 PM   #39
PurplePoot
User


Official Map Reviewer
 
Join Date: Jan 2006
Posts: 363

PurplePoot will become famous soon enough (56)PurplePoot will become famous soon enough (56)

Default

A little SubString bug that gave me hell.

SubStrings have some sort of bounds safety, as is well known. For example, SubString("test",0,9999)=="test" is true.

However, it seems their lower bound is a little stranger. Going "below" their start index can have a number of consequences:

Collapse JASS:
call SubString(<any string>,-4,0) == "Nmo"//Note that there is a zero-width space between N and m.
//And derivatives thereof, for example -3,0 == "mo" and -3,-1 == "m"
call SubString(<any string>,<-5 or lower>,<any number>) == null//Rather than just giving you the start of the string to the number you specified

EDIT: Apparently the N is not actually always an N—it's script specific (it seems to have to do with the number of globals or functions or something, but it's hard to tell).

Last edited by PurplePoot : 06-23-2009 at 08:15 PM.
PurplePoot is offline   Reply With Quote
Old 07-18-2009, 03:10 AM   #40
PurplePoot
User


Official Map Reviewer
 
Join Date: Jan 2006
Posts: 363

PurplePoot will become famous soon enough (56)PurplePoot will become famous soon enough (56)

Default

Yay for bugs.

GroupTargetOrderById does not work for 851971 (smart) on allied units. (Solution: issue 851990 (patrol) instead)

Last edited by PurplePoot : 07-18-2009 at 03:11 AM.
PurplePoot is offline   Reply With Quote
Old 12-16-2009, 12:25 PM   #41
Deaod
User
 
Join Date: Jan 2007
Posts: 539

Submissions (11)

Deaod is a jewel in the rough (188)Deaod is a jewel in the rough (188)Deaod is a jewel in the rough (188)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

Heres another one:

Assigning a new value to an image variable currently holding the invalid image (handle ID of -1) crashes the game.
__________________
Deaod is offline   Reply With Quote
Old 01-03-2010, 12:00 PM   #42
Chaos-Mapper
User
 
Join Date: May 2008
Posts: 31

Chaos-Mapper has little to show at this moment (0)

Default

Update, the first page pls with Return Bug or note that it's now in actuell warcraft version unable to use!

Thanks!
Chaos-Mapper is offline   Reply With Quote
Old 01-03-2010, 03:43 PM   #43
weaaddar
User


Respected User
 
Join Date: Apr 2002
Posts: 2,372

Submissions (3)

weaaddar has a spectacular aura about (131)

Default

Create lightening native can return a null handle. Since this null handle can be manipulated, you have to go and attach like a boolean to determine if its created. Really annoying.

The fogstate exploit allows you to typecast from integers -> handles.
weaaddar is offline   Reply With Quote
Old 01-16-2010, 09:36 PM   #44
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


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

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

Isn't that what CreateLightningEx was supposed to solve, weaaddar?
__________________
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.
Pyrogasm 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 05:00 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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