sentrywiz
S
sentrywiz
I made this thread prefix jass so that more people that know jass check it out.
I want to use a save code to file script (as I understand, AceHart is the one that made it) so I'll say AceHart's script. But i don't need it for heroes. Instead i want to save a bunch of integers (or reals) and booleans. So in essence all I need from the script is to save the player's name, so its unique, and a bunch of numbers and booleans ( booleans can even be strings like y or n or numbers 1 or 0 if saving booleans is hard ) and lastly, somehow hash it via some other script so its not reproducible
This is the script I found googling, so i assume its the same one i can use, but modified. So how do i do that?
For answering purposes say i want to save:
1. Player's name
2. Let's say 12 integers
3. Let's say 12 boolean
And somehow hash it via some other script and produce a file in a folder out of it.
Lastly, I failed to find a load code. So that too will be very useful... actually i really need it so please, share links
I want to use a save code to file script (as I understand, AceHart is the one that made it) so I'll say AceHart's script. But i don't need it for heroes. Instead i want to save a bunch of integers (or reals) and booleans. So in essence all I need from the script is to save the player's name, so its unique, and a bunch of numbers and booleans ( booleans can even be strings like y or n or numbers 1 or 0 if saving booleans is hard ) and lastly, somehow hash it via some other script so its not reproducible
This is the script I found googling, so i assume its the same one i can use, but modified. So how do i do that?
JASS:
function CreateTextFile takes nothing returns nothing
local integer p = GetPlayerId(GetTriggerPlayer())+1
local string heroName = GetUnitName(udg_Hero)
local integer heroLevel = GetHeroLevel(udg_Hero)
call PreloadGenClear()
call PreloadGenStart()
// The line below creates the log
// Right now, this is:
// Hero: (hero name)
// Level: (hero level)
// Code: -load XXXX
call Preload("\r\n\t\t\t\tHero: " + heroName + "\r\n\t\t\t\t" + "Level: " + I2S(heroLevel) + "\t\t\r\n\t\t\t\t" + "Code: -load " + udg_NPS_Password + "\r\n\n\t\t ")
// The line below creates the file at the specified location
// Right now, this is:
// "Warcraft III\MapName\(hero name) - (hero level)"
call PreloadGenEnd("MapName\\" + heroName + " - " + I2S(heroLevel) + ".txt")
endfunction
For answering purposes say i want to save:
1. Player's name
2. Let's say 12 integers
3. Let's say 12 boolean
And somehow hash it via some other script and produce a file in a folder out of it.
Lastly, I failed to find a load code. So that too will be very useful... actually i really need it so please, share links