Staredit Network > Forums > Modding Assistance > Topic: [GPTP] TerminatePlugin()?
[GPTP] TerminatePlugin()?
Aug 13 2012, 10:11 am
By: Sand Wraith  

Aug 13 2012, 10:11 am Sand Wraith Post #1

she/her

Does anyone know if this function actually works or anything?

EDIT:

(Actually, I'm fairly certain this function /is/ called and /does/ work. I can write code to crash SC as it exits, but see below.)

I've also tried writing a test file in this function, but it either does not work or it is appearing somewhere I do not expect it to. (Not in any of my StarCraft directories - maybe a system one?)

qdp.cpp
Code
 BOOL WINAPI TerminatePlugin() {
   //Called when starcraft closes

     // BROKEN AS FUCK, I DON'T EVEN KNOW IF IT IS CALLED

    std::ofstream musicCheckEnd("music", ios::in);
    if(musicCheckEnd.is_open()) // music was enabled
    {
        // perform cleanup
        std::ofstream musicExit("exit", ios::out);
        musicExit.close();
    }
    musicCheckEnd.close();

   return true;
 }


EDIT2:

Clarification. If I place the file "music" in either my SCBW main directory where the SC EXE is or where the mod's EXE is, it doesn't work. I don't know where else it could be reading/writing to, though.

Post has been edited 1 time(s), last time on Aug 13 2012, 10:44 am by Sand Wraith.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:03 am]
Symmetry -- Roy the way the screen moves hurts my eyes but otherwise it plays remarkably well
[05:23 pm]
Roy -- Moose
Moose shouted: Just made? I thought we had that years ago
"We have Super Mario at home."
[2026-8-11. : 4:44 am]
Zycorax -- :wob:
[2026-8-11. : 2:30 am]
Symmetry -- :wob:
[2026-8-10. : 1:36 am]
Moose -- Thinking on it more, I vaguely remember it being annoying because it kept repeating some short loop of the Super Mario World theme LMAO
[2026-8-10. : 12:57 am]
Oh_Man -- I thought i remembered an old mario map but i searched super mario starcraft on utube and i couldnt see anything cept UMS
[2026-8-09. : 11:40 pm]
lil-Inferno -- Blizzard forgot about SC so it's okay
[2026-8-09. : 7:04 pm]
Symmetry -- malware maps for everyone
[2026-8-09. : 7:03 pm]
Moose -- probs lmao
[2026-8-09. : 6:57 pm]
Symmetry -- (and will be patched)
Please log in to shout.


Members Online: MarineElite