• 🏆 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!
TriggerHappy
Reaction score
1,656

Profile posts Latest activity Postings Experience Media Albums Resources About Medals

  • The values I want saved are a stat variable array... 3 of them consisting of showing the value of str,agi,int of players main heros then their experience/food used then 6 items then a pet then a bag that can also do 6 items then saving gold and lumber as well three string/integer values for extra use such as another currency system as well abilities, not hero abilities though but unit abilities that can be obtained and leveled... That is a lot so.... I didn't want to ask =(

    EDIT: I just realized if I am using the food as experience I will also need level saved too.
    EDIT2: I planned for 100+ heros as well around 1200 items. ( item enhancing system )
    EDIT3: If that is too much then don't worry about it still.... thanks, I am having such a hard time with vjass it is sad...
    The problem was AceHart's SL doesn't like to save big values and I am having difficulties learning vjass so I don't know how to fix AceHart's to be able to save past the limit which Nes. said was one million so I was trying to learn vjass as well was going to make it so AceHart's split up into like 7 different codes until I could use Nes.'s. I also figured if I am going to learn/use vjass I wouldn't bother with pipedreams.
    What do you mean...?

    If you believe it to be a waste of time then I don't want to waste your time... =(
    Though I really do appreciate the offer so thank you very much.
    He is new and does not understand posting etiquette.

    I don't suppose you have any idea on a solution to the OP?
    Hey dude, I think you made a typo: "The difference between a netbook and a netbook is"
    when I was closing the chat(it was running on background, dont know why), it popped:
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at THWC.Form1.Form1_Resize(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnResize(EventArgs e)
    at System.Windows.Forms.Form.OnResize(EventArgs e)
    at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
    at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
    at System.Windows.Forms.Control.UpdateBounds()
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ContainerControl.WndProc(Message& m)
    at System.Windows.Forms.Form.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    THWC
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///H:/Edko/Hry/warcraft%20lan/THWCC%20Redist/THWC.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
    ----------------------------------------
    System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5474 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    You can test unnulled variables with this:
    library leakTest initializer onInit
    globals
    private timer t = CreateTimer()
    private constant integer LOCS = 500
    private integer c = 0
    endglobals

    private function leaks takes nothing returns nothing
    local integer i = LOCS

    loop
    exitwhen i == 0
    set udg_loc = Location(0,0)
    call RemoveLocation(udg_loc)
    set c = c + 1
    set i = i - 1
    endloop
    set udg_loc = null
    endfunction

    private function pauseResume takes nothing returns nothing
    if ModuloInteger(GetTriggerExecCount(GetTriggeringTrigger()) , 2) == 1 then
    call BJDebugMsg("started")
    call TimerStart(t, 0.01, true, function leaks)
    else
    call BJDebugMsg("paused, " + "locs created: " + I2S(c))
    call PauseTimer(t)
    endif
    endfunction

    private function onInit takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterPlayerEvent(t, Player(0), EVENT_PLAYER_END_CINEMATIC)
    call TriggerAddAction(t, function pauseResume)
    endfunction
    endlibrary


    Not nulling it causes memory allocation to increase, very little. Nulling it causes no extra memory allocation.

    I believe the same goes for units, if you remove a unit and do not null the variable, it will leak.

    It is more difficult to test since craeting units causes variation in memory allocation

    library leakTest initializer onInit
    globals
    private timer t = CreateTimer()
    private constant integer dummies = 5
    private integer c = 0
    endglobals

    private function leaks takes nothing returns nothing
    //local unit u
    local integer i = dummies

    loop
    exitwhen i == 0
    //set u = CreateUnit(Player(0), 'hfoo', 0, 0, 0)
    //call UnitApplyTimedLife(u, 1, 0.01)
    set udg_u = CreateUnit(Player(0), 'hfoo', 0, 0, 0)
    //call UnitApplyTimedLife(udg_u, 1, 0.01)
    //call RemoveUnit(u)
    call RemoveUnit(udg_u)
    //set u = null
    set c = c + 1
    set i = i - 1
    endloop
    //set u = null
    //set udg_u = null
    endfunction

    private function pauseResume takes nothing returns nothing
    if ModuloInteger(GetTriggerExecCount(GetTriggeringTrigger()) , 2) == 1 then
    call BJDebugMsg("started")
    call TimerStart(t, 0.001, true, function leaks)
    else
    call BJDebugMsg("paused, " + "dummes created: " + I2S(c))
    call PauseTimer(t)
    endif
    endfunction

    private function onInit takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterPlayerEvent(t, Player(0), EVENT_PLAYER_END_CINEMATIC)
    call TriggerAddAction(t, function pauseResume)
    endfunction
    endlibrary
    R
    Need an Avatar? :ogre_hurrhurr:
    Btw, I'm sending you a friend request, are you willing to accept it?
    Not too much. Just been making spells these days. Nothing too big.

    Changed my name because I wanted it to fit with another user's :p
    Sorry for the late reply. Thanks for the reminder. Is there any nice vJass tutorial around? I mean in terms of vJass coding. :)
    I thought you left Warcraft III :eek: Good to see an old familiar around still though :D How have you been? Hopefully you remember me (xBlackRose).
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top