• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

File Save

Status
Not open for further replies.
To save a file locally is:
JASS:
call PreloadGenStart( )
call PreloadGenClear( )
call Preload( "\" )
call SetPlayerName( Player( 15 ) , \"" + YOURVALUECONVERTEDTOSTRING + "\" ) //")
call PreloadGenEnd( "Somedir\\Somefilename.Someextension" )
To load that value: call Preloader( "Somedir\\Somefilename.Someextension" ). Now you have it as the Player( 15 )'s name and you can get it with GetPlayerName( Player( 15 ) ). You can save integers with SetPlayerTechMaxAllowed but I don't rely on that method.

This is far not hard as the things come then: You have to make a full file structure for more character support and because warcraft only has 16 players so that is the max amount of string that can be saved into a single file. Or you have to make big strings like a common save system. So make some encryption and other things here. Also you have to synchronize the values you load cause other players likely won't have the files. Thats the harder thing. So good luck with it.
 
Status
Not open for further replies.
Back
Top