• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Please help. Memory Exhausted

Status
Not open for further replies.
Level 5
Joined
Oct 27, 2020
Messages
18
Been working this map safely for days and this is the last issue that messed my map.
Can someone fix the error?

Not sure what this means.
damn-png.371227


Uploaded the map for consultation.
 

Attachments

  • Spell (Base).w3x
    3.8 MB · Views: 19
  • DAMN.PNG
    DAMN.PNG
    43.2 KB · Views: 190
Level 5
Joined
Oct 27, 2020
Messages
18
I can't seem to start the map.
screenshot_1-png.371232



4gb should be enough, but how much of that is free? Meaning, how much is used by other applications?
That's weird. Map saves well. Jasshelper don't show you errors. But map won't run.
Even the game does not say anything, just exclamation and an ok button. Strange.
Mine just crash W3.

I have 70% free ram. No antivirus (offed), no running apps (disabled them before).

EDIT:
Tried to see the logs in jasshelper dump files and followed the Line Error but it suspects some safe libraries like GetCollision, UnitIndexer, and some random lines. Seems to me that the logs are unreliable and can't show precise suspect at all what causes the issue.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
As the JASSHelper error window reports, there is a syntax error in trigger Windrogue Techniques.

Specifically the following function...
JASS:
//The main spell is here.
function Spell_Actions takes nothing returns nothing
    //Sets locals for MUI and leak removal.
    local unit Blinky = GetSpellTargetUnit()
    local unit Blink_E = GetSpellAbilityUnit()
    local unit B_Dummy
    local integer LI = 1
    local location TR
    local real BlinkX = GetUnitX(Blinky)
    local real BlinkY = GetUnitY(Blinky)
    local rect BlinkRect
    local location BlinkELoc
    local real Stat
    local integer AL
    local real BD
    local real DMG
    local integer Dmmy
    local fogmodifier Fog
//==================================================================
//Definable Variables Below==========================================
//==================================================================
    //Change to STR for Strength, AGI for Agility, and INT for intelligence.
    local string Attribute = "AGI"
    //Multiplier Percentage of the spell (Will be multiplied by Spell Level [eg. Mult=.1) and Spell level is 3 the final Mult will be .3])
    local real Mult = 0
    //Wait between movement/attacks.
    local real MWait = .01
    //Number of attacks
    local integer NumA = 500
    //Square Range of "Blink"
    local integer Bx = 600
    //Dummy Unit RAW ID
    set Dmmy = 'h03X'
    //Base Spell Damage
    set BD = 5
    //End of Definable Variables
//==================================================================
//===================================================================
//==================================================================

    if ( Attribute == "STR")then
        set Stat = I2R(GetHeroStr(Blink_E,true))
    elseif (Attribute == "AGI")then
        set Stat = I2R(GetHeroAgi(Blink_E,true))
    elseif (Attribute == "INT")then
        set Stat = I2R(GetHeroInt(Blink_E,true))
    endif
    set AL = GetUnitAbilityLevel(Blink_E,GetSpellAbilityId())
    set DMG =((Stat*(Mult*(I2R(AL))))+BD)
    call Loc_trg()
    call PauseUnit(Blinky,true)
    call PauseUnit(Blink_E,true)
    call SetUnitInvulnerable(Blink_E,true)
    set Fog = CreateFogModifierRadius(GetOwningPlayer(Blink_E),FOG_OF_WAR_VISIBLE,BlinkX,BlinkY,512,true,false)
    call FogModifierStart(Fog)
    loop
        exitwhen LI > NumA
        if GetUnitState(Blinky,UNIT_STATE_LIFE) >= 0.45 then
            set BlinkX = GetUnitX(Blinky)
            set BlinkY = GetUnitY(Blinky)
            set BlinkRect = Rect(BlinkX-Bx*0.5,BlinkY-Bx*0.5,BlinkX+Bx*0.5,BlinkY+Bx*0.5)
            set TR = Location(GetRandomReal(GetRectMinX(BlinkRect), GetRectMaxX(BlinkRect)), GetRandomReal(GetRectMinY(BlinkRect), GetRectMaxY(BlinkRect)))
            call SetUnitPositionLoc(Blink_E,TR)
            call SetUnitFacing(Blink_E,bj_RADTODEG*Atan2(BlinkY-GetLocationY(TR),BlinkX-GetLocationX(TR)))
            set B_Dummy = CreateUnit(GetOwningPlayer(Blink_E),Dmmy,GetUnitX(Blink_E),GetUnitY(Blink_E),bj_RADTODEG*Atan2(GetUnitY(Blinky)-BlinkY,GetUnitX(Blinky)-BlinkX))
            call IssueTargetOrder(B_Dummy,"attackonce",Blinky)
            call SetUnitUserData(B_Dummy,R2I(DMG))
            call TriggerSleepAction(MWait)
            call RemoveLocation(TR)
        else
            call PauseUnit(Blink_E,false)
            call SetUnitInvulnerable(Blink_E,false)          
            call DestroyFogModifier(Fog)
            return
        endif      
        set LI = LI + 1
    endloop
    call PauseUnit(Blink_E,false)
    call DestroyFogModifier(Fog)
    call SetUnitInvulnerable(Blink_E,false)
    call PauseUnit(Blinky,false)
    call RemoveRect(BlinkRect)
    call RemoveLocation(BlinkELoc) // ERROR HERE - BlinkELoc is not initialized at this point!
    set Fog = null
    set BlinkRect = null
    set Blinky = null
    set Blink_E = null
    set B_Dummy = null
    set BlinkELoc = null
    set TR = null
    set LI = 0
endfunction

BlinkELoc is never initialized to a location value before being passed to RemoveLocation. Commenting out the RemoveLocation line for it fixes the syntax error and allows the map to save without error. Once saved without an error the map will run when tested. This was personally verified using the current version of Warcraft III.
 
Level 5
Joined
Oct 27, 2020
Messages
18
As the JASSHelper error window reports, there is a syntax error in trigger Windrogue Techniques.

Specifically the following function...
JASS:
//The main spell is here.
function Spell_Actions takes nothing returns nothing
    //Sets locals for MUI and leak removal.
    local unit Blinky = GetSpellTargetUnit()
    local unit Blink_E = GetSpellAbilityUnit()
    local unit B_Dummy
    local integer LI = 1
    local location TR
    local real BlinkX = GetUnitX(Blinky)
    local real BlinkY = GetUnitY(Blinky)
    local rect BlinkRect
    local location BlinkELoc
    local real Stat
    local integer AL
    local real BD
    local real DMG
    local integer Dmmy
    local fogmodifier Fog
//==================================================================
//Definable Variables Below==========================================
//==================================================================
    //Change to STR for Strength, AGI for Agility, and INT for intelligence.
    local string Attribute = "AGI"
    //Multiplier Percentage of the spell (Will be multiplied by Spell Level [eg. Mult=.1) and Spell level is 3 the final Mult will be .3])
    local real Mult = 0
    //Wait between movement/attacks.
    local real MWait = .01
    //Number of attacks
    local integer NumA = 500
    //Square Range of "Blink"
    local integer Bx = 600
    //Dummy Unit RAW ID
    set Dmmy = 'h03X'
    //Base Spell Damage
    set BD = 5
    //End of Definable Variables
//==================================================================
//===================================================================
//==================================================================

    if ( Attribute == "STR")then
        set Stat = I2R(GetHeroStr(Blink_E,true))
    elseif (Attribute == "AGI")then
        set Stat = I2R(GetHeroAgi(Blink_E,true))
    elseif (Attribute == "INT")then
        set Stat = I2R(GetHeroInt(Blink_E,true))
    endif
    set AL = GetUnitAbilityLevel(Blink_E,GetSpellAbilityId())
    set DMG =((Stat*(Mult*(I2R(AL))))+BD)
    call Loc_trg()
    call PauseUnit(Blinky,true)
    call PauseUnit(Blink_E,true)
    call SetUnitInvulnerable(Blink_E,true)
    set Fog = CreateFogModifierRadius(GetOwningPlayer(Blink_E),FOG_OF_WAR_VISIBLE,BlinkX,BlinkY,512,true,false)
    call FogModifierStart(Fog)
    loop
        exitwhen LI > NumA
        if GetUnitState(Blinky,UNIT_STATE_LIFE) >= 0.45 then
            set BlinkX = GetUnitX(Blinky)
            set BlinkY = GetUnitY(Blinky)
            set BlinkRect = Rect(BlinkX-Bx*0.5,BlinkY-Bx*0.5,BlinkX+Bx*0.5,BlinkY+Bx*0.5)
            set TR = Location(GetRandomReal(GetRectMinX(BlinkRect), GetRectMaxX(BlinkRect)), GetRandomReal(GetRectMinY(BlinkRect), GetRectMaxY(BlinkRect)))
            call SetUnitPositionLoc(Blink_E,TR)
            call SetUnitFacing(Blink_E,bj_RADTODEG*Atan2(BlinkY-GetLocationY(TR),BlinkX-GetLocationX(TR)))
            set B_Dummy = CreateUnit(GetOwningPlayer(Blink_E),Dmmy,GetUnitX(Blink_E),GetUnitY(Blink_E),bj_RADTODEG*Atan2(GetUnitY(Blinky)-BlinkY,GetUnitX(Blinky)-BlinkX))
            call IssueTargetOrder(B_Dummy,"attackonce",Blinky)
            call SetUnitUserData(B_Dummy,R2I(DMG))
            call TriggerSleepAction(MWait)
            call RemoveLocation(TR)
        else
            call PauseUnit(Blink_E,false)
            call SetUnitInvulnerable(Blink_E,false)         
            call DestroyFogModifier(Fog)
            return
        endif     
        set LI = LI + 1
    endloop
    call PauseUnit(Blink_E,false)
    call DestroyFogModifier(Fog)
    call SetUnitInvulnerable(Blink_E,false)
    call PauseUnit(Blinky,false)
    call RemoveRect(BlinkRect)
    call RemoveLocation(BlinkELoc) // ERROR HERE - BlinkELoc is not initialized at this point!
    set Fog = null
    set BlinkRect = null
    set Blinky = null
    set Blink_E = null
    set B_Dummy = null
    set BlinkELoc = null
    set TR = null
    set LI = 0
endfunction

BlinkELoc is never initialized to a location value before being passed to RemoveLocation. Commenting out the RemoveLocation line for it fixes the syntax error and allows the map to save without error. Once saved without an error the map will run when tested. This was personally verified using the current version of Warcraft III.
I suspect my 4GB ram will not work, or outdated Warcraft 3 game, or outdated jass stuff or JNGP. Does not work for me still even spell is disabled or deleted.
damn-png.371245
 

Attachments

  • DAMN.PNG
    DAMN.PNG
    64.3 KB · Views: 138
Status
Not open for further replies.
Top