Aller au contenu

Photo

hak version control


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Proleric

Proleric
  • Members
  • 2 354 messages
I devised a simple method for ensuring that players are using the right version of my haks.
 
Each hak contains a uniquely-named custom 2da file, containing one row with one field - the hak version number.
 
It's checked OnClientEnter:
 
 
float  fHakMain    = 0.01;
float  fHakTile    = 0.01;
string sHakMain    = Get2DAString("_main_version", "Version", 0);
string sHakTile    = Get2DAString("_tile_version", "Version", 0);
 
if ((StringToFloat(sHakMain)  < fHakMain)
  ||  (StringToFloat(sHakTile)  < fHakTile))
    PopUpDeathGUIPanel(oPC, FALSE, FALSE, 0,
      "Fatal error : dark_energy.hak version " + sHakMain
      + " dark_energy_tile.hak version " + sHakTile
      + " are out-of-date. Please download the latest versions from proleric.com");
 
It occurs to me that this would be a useful feature to have in CEP and other commonly-used systems, on a forward basis.
  • Zwerkules, Shadooow, kalbaern et 4 autres aiment ceci

#2
meaglyn

meaglyn
  • Members
  • 809 messages

I think that's a good idea. You might want to clean up the error message so that is lists specifically those which are out of date though. What you have will report that both are out of date even if only one is which will likely be frustrating for users, espcecially when there are more than just two haks involved...


  • Proleric, kalbaern et Verilazic aiment ceci

#3
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

I am guessing that this works only for single player.   



#4
meaglyn

meaglyn
  • Members
  • 809 messages

I am guessing that this works only for single player.   

What makes you say that?  Umm... nevermind.



#5
Proleric

Proleric
  • Members
  • 2 354 messages
I don't know much about MP, but why wouldn't it work?

#6
WhiZard

WhiZard
  • Members
  • 1 204 messages

Get2DAString() would return the server's hak/tile version, not the client's.