Starcraft 1.5 Trigger Rewriting Help

night_wolveX

New Member
Reaction score
17
Due to the new patch 1.24 stuffing up all my Starcraft maps i need some help rewriting all my custom JASS triggers to function in with the new patch.

Alot of the custom script coding i didn't make and all the JASS coding i didn't make either but im hoping some bright minded JASS experts will be able to help me fix the broken triggers i have atm

All members who submit help will be added to my projects credit section thats a promise.
 

night_wolveX

New Member
Reaction score
17
Ok so i guess we should start at the Handle Varibles;

Here is what i had before patch 1.24

JASS:
//*********************************************************************************************
//*
//* Handle Variables
//*
//*********************************************************************************************

//=============================================================================================
// Return Bug Exploiters
//=============================================================================================
function HandleVars_GetInt takes handle h returns integer
    return h
    return 0
endfunction

//=============================================================================================
function LocalVars takes nothing returns gamecache
    return InitGameCache("jasslocalvars.w3v")
endfunction

function SetHandleHandle takes handle subject, string name, handle value returns nothing
    if value==null then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, HandleVars_GetInt(value) )
    endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
    if value==0 then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
    endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
        call FlushStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
    else
        call StoreReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction

function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
    return null
endfunction

function GetHandleInt takes handle subject, string name returns integer
    return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function GetHandleReal takes handle subject, string name returns real
    return GetStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function FlushHandleLocals takes handle subject returns nothing
    call FlushStoredMission(LocalVars(), I2S(HandleVars_GetInt(subject)) )
endfunction

function PylonCondition takes nothing returns boolean
    return ( GetUnitTypeId(GetFilterUnit()) == 'e007' )
endfunction


After checking each line i had to remove a few lines and thanks to ap0calypse i I was able to fix the function HandleVars_GetInt coding. So this is what i have thats working atm

JASS:
//*********************************************************************************************
//*
//* Handle Variables
//*
//*********************************************************************************************

//=============================================================================================
// Return Bug Exploiters
//=============================================================================================
function HandleVars_GetInt takes handle h returns integer
    return GetHandleId(h)
endfunction
//=============================================================================================
function LocalVars takes nothing returns gamecache
    return InitGameCache("jasslocalvars.w3v")
endfunction

function PylonCondition takes nothing returns boolean
    return ( GetUnitTypeId(GetFilterUnit()) == 'e007' )
endfunction
 

Jesus4Lyf

Good Idea™
Reaction score
397
You should start by not using LHV.
Responses like this give me the urge to do this...
JASS:
//*********************************************************************************************
//*
//* Handle Variables
//*
//*********************************************************************************************

//=============================================================================================
// Return Bug Exploiters
//=============================================================================================
function HandleVars_GetInt takes handle h returns integer
    return GetHandleId(h)
endfunction

//=============================================================================================
function LocalVars takes nothing returns gamecache
    return InitGameCache("jasslocalvars.w3v")
endfunction

function SetHandleHandle takes handle subject, string name, handle value returns nothing
    if value==null then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, HandleVars_GetInt(value) )
    endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
    if value==0 then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
    endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
        call FlushStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
    else
        call StoreReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction

function GetHandleHandleSubcall takes handle subject, string name returns handle
call GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
if false then
    return null
endif
endfunction
function ReturnH takes handle h returns handle
return h
endfunction
function GetHandleHandle takes handle subject, string name returns handle
return ReturnH(GetHandleHandleSubcall(subject,name))
endfunction

function GetHandleInt takes handle subject, string name returns integer
    return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function GetHandleReal takes handle subject, string name returns real
    return GetStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function FlushHandleLocals takes handle subject returns nothing
    call FlushStoredMission(LocalVars(), I2S(HandleVars_GetInt(subject)) )
endfunction

function PylonCondition takes nothing returns boolean
    return ( GetUnitTypeId(GetFilterUnit()) == 'e007' )
endfunction

Don't do it. It's a trap. <3

You can do whatever you like (LHV is fine) but port it to hashtables. This whole idea that when a user asks for help, you should read the standards to them because they're slightly better optimised, is kinda silly.

Tell us if you're willing to use JASS NewGen. If not, that code leaks and sucks, but it will work... (for now.)
 

night_wolveX

New Member
Reaction score
17
Responses like this give me the urge to do this...
JASS:
//*********************************************************************************************
//*
//* Handle Variables
//*
//*********************************************************************************************

//=============================================================================================
// Return Bug Exploiters
//=============================================================================================
function HandleVars_GetInt takes handle h returns integer
    return GetHandleId(h)
endfunction

//=============================================================================================
function LocalVars takes nothing returns gamecache
    return InitGameCache(&quot;jasslocalvars.w3v&quot;)
endfunction

function SetHandleHandle takes handle subject, string name, handle value returns nothing
    if value==null then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, HandleVars_GetInt(value) )
    endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
    if value==0 then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
    endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
        call FlushStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
    else
        call StoreReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction

function GetHandleHandleSubcall takes handle subject, string name returns handle
call GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
if false then
    return null
endif
endfunction
function ReturnH takes handle h returns handle
return h
endfunction
function GetHandleHandle takes handle subject, string name returns handle
return ReturnH(GetHandleHandleSubcall(subject,name))
endfunction

function GetHandleInt takes handle subject, string name returns integer
    return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function GetHandleReal takes handle subject, string name returns real
    return GetStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function FlushHandleLocals takes handle subject returns nothing
    call FlushStoredMission(LocalVars(), I2S(HandleVars_GetInt(subject)) )
endfunction

function PylonCondition takes nothing returns boolean
    return ( GetUnitTypeId(GetFilterUnit()) == &#039;e007&#039; )
endfunction

Don't do it. It's a trap. <3

You can do whatever you like (LHV is fine) but port it to hashtables. This whole idea that when a user asks for help, you should read the standards to them because they're slightly better optimised, is kinda silly.

Tell us if you're willing to use JASS NewGen. If not, that code leaks and sucks, but it will work... (for now.)

Thank you Jesus4Lyf for the help. I appreciate the code very much thank you and ill add your name to the credits section of course. As i stated i know absolutely nothing about JASS, like all this means nothing to me which sucks, as i know you guys must think great helping a dumb ass or something. I didn't write this code so i don't even know what it really does and as my old maps don't work with the new patch i figured there must be someone smart enough to fix these triggers for me. I am willing to use JASS NewGen as long as the coding wont interfere with the new patch.
 

Jesus4Lyf

Good Idea™
Reaction score
397
See, problem is what I posted could break if Blizz patches things.
Here is a better code - I don't know if your code accesses the gamecache directly or anything but this shouldn't break for a Blizz patch:
JASS:
//*********************************************************************************************
//*
//* Handle Variables
//*
//*********************************************************************************************

//=============================================================================================
// Return Bug Exploiters
//=============================================================================================
globals
hashtable LHVhash=InitHashtable()
endglobals

function HandleVars_GetInt takes handle h returns integer
    return GetHandleId(h)
endfunction

//=============================================================================================
function LocalVars takes nothing returns gamecache
    return InitGameCache(&quot;jasslocalvars.w3v&quot;)
endfunction

function SetHandleHandle takes handle subject, string name, agent value returns nothing
call SaveAgentHandle(LHVhash,GetHandleId(subject),StringHash(name),value)
    if value==null then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, HandleVars_GetInt(value) )
    endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
    if value==0 then
        call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
    else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
    endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
        call FlushStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
    else
        call StoreReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction

function GetHandleHandle takes handle subject, string name returns agent
return LoadAgentHandle(LHVhash,GetHandleId(subject),StringHash(name))
endfunction

function GetHandleInt takes handle subject, string name returns integer
    return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function GetHandleReal takes handle subject, string name returns real
    return GetStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function FlushHandleLocals takes handle subject returns nothing
    call FlushStoredMission(LocalVars(), I2S(HandleVars_GetInt(subject)) )
endfunction

function PylonCondition takes nothing returns boolean
    return ( GetUnitTypeId(GetFilterUnit()) == &#039;e007&#039; )
endfunction

It doesn't match the interface as well but should work. I wasn't able to test if it compiles. See how you go. :)
 

night_wolveX

New Member
Reaction score
17
Thanks Jesus4Lyf, I just tried to add the new Coding and it didn't work work unfortunately. The first code works atm is there anything you need to know about my maps to help you.

Again thank you so much for the help mate.

night_wolveX
Starcraft 1.5 Project Creator
 

Jesus4Lyf

Good Idea™
Reaction score
397
>Thanks Jesus4Lyf, I just tried to add the new Coding and it didn't work work unfortunately.
With what error? :)
The first code I posted is good (accurate to what you had previously) and works, but Blizzard may patch it (may break it). It is still using much the same exploit (but my version of it which still works).

How much code uses this in your map?
 

night_wolveX

New Member
Reaction score
17
With what error?

I got 1565 compile errors come up 'expected end of line' etc. I would list them all but it would take forever.

The first code I posted is good (accurate to what you had previously) and works, but Blizzard may patch it (may break it). It is still using much the same exploit (but my version of it which still works)

I'm sorry i don't know what you mean by using the same exploit.

How much code uses this in your map?

Well i don't really know to be sure. I think it is for about 35% of the JASS code i have in my maps. Alot of my triggers are GUI.
 

night_wolveX

New Member
Reaction score
17
Ok as ive got a simiular threads posted on another wc3 community site. I have tired this Handle Varible script with the use of NewGen WE.

JASS:
/*******************************************************************************************
 Faux Handle Vars
 ----------------
    Do not use these functions for new stuff, it is just not the right thing to do...

    The intention of Faux Handle Vars is to be a patch fix for a map&#039;s migration to
patch 1.24 This library might not cover all uses of handle vars, some of them are just
  impossible with the new rules set in patches 1.23b and 1.24, but they should work for
  most of the cases....

    All of them but the SetHandle*** ones are inline friendly. I follow the interface
  in official Kattana&#039;s handle vars from wc3jass.com, if your handle vars functions
look different, then you were not using handle vars but another thing...

*******************************************************************************************/

//==========================================================================================
library HandleVars initializer init

 globals
    private hashtable ht
endglobals

    // too bad the Handle vars&#039; old functionality forces me to make these things
    // inline-unfriendly
    function SetHandleHandle takes agent subject, string label, agent value returns nothing
        if(value==null) then
            call RemoveSavedHandle( ht, GetHandleId(subject), StringHash(label))
        else
call SaveAgentHandle( ht, GetHandleId(subject), StringHash(label), value)
        endif
    endfunction

    function SetHandleInt takes agent subject, string label, integer value returns nothing
        if value==0 then
            call RemoveSavedInteger(ht, GetHandleId(subject), StringHash(label))
        else
call SaveInteger(ht, GetHandleId(subject), StringHash(label), value)
        endif
    endfunction

    function SetHandleBoolean takes agent subject, string label, boolean value returns nothing
        if (value == false) then
            call RemoveSavedBoolean(ht, GetHandleId(subject), StringHash(label))
        else
call SaveBoolean(ht, GetHandleId(subject), StringHash(label), value)
        endif
    endfunction

    function SetHandleReal takes agent subject, string label, real value returns nothing
        if (value == 0.0) then
            call RemoveSavedReal(ht, GetHandleId(subject), StringHash(label))
        else
call SaveReal(ht, GetHandleId(subject), StringHash(label), value)
        endif
    endfunction

    function SetHandleString takes agent subject, string label, string value returns nothing
        if ((value==&quot;&quot;) or (value==null)) then
            call RemoveSavedString(ht, GetHandleId(subject), StringHash(label))
        else
call SaveStr(ht, GetHandleId(subject), StringHash(label), value) //yay for blizz&#039; consistent naming scheme...
        endif
    endfunction

function GetHandleHandle takes agent subject, string label returns agent
        debug call BJDebugMsg(&quot;[debug] What the heck? Why would you call HandleHandle I guess this was caused by a search and replace mistake&quot;)
        return null
    endfunction

    // these are inline friendly, ok, maybe they aren&#039;t because jasshelper does not recognize
    // GetHandleId as non-state changing. But they will be once I fix jasshelper...

function GetHandleInt takes agent subject, string label returns integer
        return LoadInteger(ht, GetHandleId(subject), StringHash(label))
    endfunction

    function GetHandleBoolean takes agent subject, string label returns boolean
        return LoadBoolean(ht, GetHandleId(subject), StringHash(label))
    endfunction

    function GetHandleString takes agent subject, string label returns string
        return LoadStr(ht, GetHandleId(subject), StringHash(label))
    endfunction

    function GetHandleReal takes agent subject, string label returns real
        return LoadReal(ht, GetHandleId(subject), StringHash(label))
    endfunction

    // got bored so I now use a textmacro...
    //! textmacro FAUX_HANDLE_VARS_GetHandleHandle takes NAME, TYPE
         function SetHandle$NAME$ takes agent subject, string label, $TYPE$ value returns nothing
             if(value==null) then
                call RemoveSavedHandle( ht, GetHandleId(subject), StringHash(label))
             else
                call Save$NAME$Handle( ht, GetHandleId(subject), StringHash(label), value)
             endif
         endfunction

         function GetHandle$NAME$ takes agent subject, string label returns $TYPE$
             return Load$NAME$Handle( ht, GetHandleId(subject), StringHash(label))
         endfunction
    //! endtextmacro
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Player&quot;,&quot;player&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Widget&quot;,&quot;widget&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Destructable&quot;,&quot;destructable&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Item&quot;,&quot;item&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Unit&quot;,&quot;unit&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Ability&quot;,&quot;ability&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Timer&quot;,&quot;timer&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Trigger&quot;,&quot;trigger&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;TriggerCondition&quot;,&quot;triggercondition&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;TriggerAction&quot;,&quot;triggeraction&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;TriggerEvent&quot;,&quot;event&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Force&quot;,&quot;force&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Group&quot;,&quot;group&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Location&quot;,&quot;location&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Rect&quot;,&quot;rect&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;BooleanExpr&quot;,&quot;boolexpr&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Sound&quot;,&quot;sound&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Effect&quot;,&quot;effect&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;UnitPool&quot;,&quot;unitpool&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;ItemPool&quot;,&quot;itempool&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Quest&quot;,&quot;quest&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;QuestItem&quot;,&quot;questitem&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;DefeatCondition&quot;,&quot;defeatcondition&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;TimerDialog&quot;,&quot;timerdialog&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Leaderboard&quot;,&quot;leaderboard&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Multiboard&quot;,&quot;multiboard&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;MultiboardItem&quot;,&quot;multiboarditem&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Trackable&quot;,&quot;trackable&quot;)
//! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Dialog&quot;,&quot;dialog&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Button&quot;,&quot;button&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;TextTag&quot;,&quot;texttag&quot;)
//! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Lightning&quot;,&quot;lightning&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Image&quot;,&quot;image&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Ubersplat&quot;,&quot;ubersplat&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Region&quot;,&quot;region&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;FogState&quot;,&quot;fogstate&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;FogModifier&quot;,&quot;fogmodifier&quot;)
    //! runtextmacro FAUX_HANDLE_VARS_GetHandleHandle(&quot;Hashtable&quot;,&quot;hashtable&quot;)


    function FlushHandleVars takes agent subject returns nothing
        call FlushChildHashtable(ht, GetHandleId(subject))
    endfunction
    function FlushHandleLocals takes agent subject returns nothing
        call FlushHandleVars(subject)
    endfunction


    private function init takes nothing returns nothing
        set ht=InitHashtable()
    endfunction

endlibrary

function PylonCondition takes nothing returns boolean
    return ( GetUnitTypeId(GetFilterUnit()) == &#039;e007&#039; )
endfunction


I saved and reopened in the Standard Blizzard editor and it works. Is this code good or bad??
 

Sim

Forum Administrator
Staff member
Reaction score
534
> I got 1565 compile errors come up 'expected end of line' etc. I would list them all but it would take forever.

Typical, coming from WE. :p

[ljass]function PylonCondition takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'e007' )
endfunction[/ljass]

That really doesn't belong inside the Handle Vars code, doesn't it? ;)

> As i stated i know absolutely nothing about JASS, like all this means nothing to me which sucks,

Learning it would be a brilliant solution, as opposed to depend on other people for help. :)
 

night_wolveX

New Member
Reaction score
17
Good. Use it.

If it works it is great, the code I wrote was in case your functions directly accessed things, really. :)

Well it turns out i now need to use NewGen WE to use that handle which is ok but i use to use WE Unlimited before and the patch basically made that program useless. Atm i would prefer not to use another custom made World Editor program but the original WE from blizzard as that one gets updated whenever wc3 is updated.

I would prefer to use the original code you gave me Jesus4Lyf as it doesn't require major modification to my maps in-order for it to work. I understand it might get patched out but for now i think thats the best option i have until i understand more about what all this code means.

Learning it would be a brilliant solution, as opposed to depend on other people for help.

True but i could always recruit Jesus4Lyf and leave the advance coding to him as thats his speciality. I can trigger GUI a little but only basic stuff not super advance stuff like what im discussing here.
 

night_wolveX

New Member
Reaction score
17
Next problem i have is this trigger.

JASS:
//===========================================================================
// Trigger: ShowPylonField
//===========================================================================
function Trig_ShowPylonField_Func003C takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetTriggerUnit()) == &#039;e007&#039; ) ) then
        return false
    endif
    if ( not ( GetOwningPlayer(GetTriggerUnit()) == GetTriggerPlayer() ) ) then
        return false
    endif
    return true
endfunction

function Trig_ShowPylonField_Conditions takes nothing returns boolean
    if ( not Trig_ShowPylonField_Func003C() ) then
        return false
    endif
    return true
endfunction

function Trig_ShowPylonField_Func001A takes nothing returns nothing
    call RemoveUnit( GetEnumUnit() )
endfunction

function Trig_ShowPylonField_Func002001002001 takes nothing returns boolean
    return ( GetUnitTypeId(GetFilterUnit()) == &#039;e007&#039; )
endfunction

function Trig_ShowPylonField_Func002001002002 takes nothing returns boolean
    return ( IstUnfertig(GetFilterUnit()) == false )
endfunction

function Trig_ShowPylonField_Func002001002 takes nothing returns boolean
    return GetBooleanAnd( Trig_ShowPylonField_Func002001002001(), Trig_ShowPylonField_Func002001002002() )
endfunction

function Trig_ShowPylonField_Func002A takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, &#039;h00J&#039;, GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
    call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100.00, 100.00, 50.00 )
endfunction

function Trig_ShowPylonField_Actions takes nothing returns nothing
    call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), &#039;h00J&#039;), function Trig_ShowPylonField_Func001A )
    call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_ShowPylonField_Func002001002)), function Trig_ShowPylonField_Func002A )
endfunction

//===========================================================================
function InitTrig_ShowPylonField_Original_Copy takes nothing returns nothing
    set gg_trg_ShowPylonField_Original_Copy = CreateTrigger(  )
    call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField_Original_Copy, Player(0), true )
    call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField_Original_Copy, Player(1), true )
    call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField_Original_Copy, Player(2), true )
    call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField_Original_Copy, Player(3), true )
    call TriggerAddCondition( gg_trg_ShowPylonField_Original_Copy, Condition( function Trig_ShowPylonField_Conditions ) )
    call TriggerAddAction( gg_trg_ShowPylonField_Original_Copy, function Trig_ShowPylonField_Actions )
endfunction


This 2 functions here are causing me problems.

JASS:
function Trig_ShowPylonField_Func002001002002 takes nothing returns boolean
    return ( IstUnfertig(GetFilterUnit()) == false )
endfunction

function Trig_ShowPylonField_Func002001002 takes nothing returns boolean
    return GetBooleanAnd( Trig_ShowPylonField_Func002001002001(), Trig_ShowPylonField_Func002001002002() )
endfunction


Any ideas??
 

night_wolveX

New Member
Reaction score
17
Ok heres what WE comes up with

JASS:
return ( IstUnfertig(GetFilterUnit()) == false )


Expected a name Error

JASS:
return GetBooleanAnd( Trig_ShowPylonField_Func002001002001(), Trig_ShowPylonField_Func002001002002() )


Invalid argument type (void) Error
Expected a code statement (void) Error

JASS:
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100.00, 100.00, 50.00 )


Expected a code statement (void) Error

JASS:
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_ShowPylonField_Func002001002)), function Trig_ShowPylonField_Func002A )


Expected a function name (Void) Error

Does this help at all??
 

night_wolveX

New Member
Reaction score
17
>IstUnfertig
Doesn't exist? o_O

This might be a code from the WE Unlimited then. The map i got this trigger from used WE Unlimited.

I wouldn't have a clue what its suppose to point to, and i was hoping the code might just need to be rewritten. Might be in trouble here.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top