• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Need Help With a over asked question...

Status
Not open for further replies.

N.O

N.O

Level 6
Joined
Feb 20, 2009
Messages
200
I did not know where to put or ask this...
It is the return bug except I know the best way to fix it is hashtables but that seems to be more of a pain doing it that way...
JASS:
function fs_I2U takes integer i returns unit
    return i
    return null
endfunction

function fs_I2T takes integer i returns trigger
    return i
    return null
endfunction


function fs_I2TT takes integer i returns texttag
    return i
    return null
endfunction


function fs_I2It takes integer i returns item
    return i
    return null
endfunction

function fs_I2D takes integer i returns destructable
    return i
    return null
endfunction

function fs_I2FM takes integer i returns fogmodifier
    return i
    return null
endfunction


function fs_I2B takes integer i returns boolean
    return (i != 0)
endfunction


function fs_B2I takes boolean i returns integer
    if (i) then
        return 1
    endif
    return 0
endfunction

Just need to fix this return bug... Thank you to anyone that replies to this over asked question.
 

N.O

N.O

Level 6
Joined
Feb 20, 2009
Messages
200
I don't exactly get the point, anybody mind showing me everything/entire script fix?
 
Level 11
Joined
Apr 29, 2007
Messages
826
I would advise rewriting all return bug abusing triggers to use hashtables. It should not only make them faster than previously but also maybe less buggy.

Abusing a bug to fix a broken bug will likly be broken in the future.
Well since you can't execute arbitrary bytecode with the new hashtable way, I don't think that Blizzard will ever fix it.
 
Status
Not open for further replies.
Top