HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

NeoStorms Save/Load Code Problem

06-09-2005, 02:49 AM#1
j0sh4tran
Heres his map and basically i just copied all of his triggers and made all the pink triggers working. http://www.wc3sear.ch/?p=Spells&ID=592

Well, after i put in the load code (which is correct), my hero just disappears. Anyone know why?
06-09-2005, 04:58 AM#2
Azhag
Check your variables carefully, and make sure everything is were it supposed to be.
06-09-2005, 02:37 PM#3
j0sh4tran
I cant seem to find the problem, I think it must be in the store data, class array, and load data Triggers. Here are my 4 codes.

First one is called Is Class List Array

Class Array Setup
Events
Conditions
Actions
Set Class_List_Array_BitsRq = 6
-------- ------------------------ --------
Set Temp_Integer = 0
Set Class_List_Array[Temp_Integer] = Paladin
-------- ------------------------ --------
Set Temp_Integer = (Temp_Integer + 1)
Set Class_List_Array[Temp_Integer] = Magician
-------- ------------------------ --------
Set Temp_Integer = (Temp_Integer + 1)
Set Class_List_Array[Temp_Integer] = Sheleka
-------- ------------------------ --------
Set Temp_Integer = (Temp_Integer + 1)
Set Class_List_Array[Temp_Integer] = Necromancer

I chose every character and got a password and it whenever i load, it always gives me necromancer =\ thats what the problem is.

-------- ------------------------ --------
Set Temp_Integer = (Temp_Integer + 1)
Set Class_List_Array[Temp_Integer] = Archer
-------- ------------------------ --------
Set Temp_Integer = (Temp_Integer + 1)
Set Class_List_Array[Temp_Integer] = Sekhal


Next is Store Data

Actions
Set Temp_Integer = 0
-------- ------------------------ --------
-------- Hero Data --------
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = Class_List_Array_BitsRq
-------- NOTE: if you try to save a hero that is not in the Hero array it will just consider your hero as the First hero in the array so you'll get a hero but it might not be the right one if you didn't add the hero to the array --------
Trigger - Run Find HeroValue to NPSData <gen> (checking conditions)
-------- ------------------------ --------
-------- This Map does not save the hero (only level, class, skill pts, upgrade pts) --------
-------- ------------------------ --------
-------- Gold Data --------
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = 17
Set NPS_Data_Int[Temp_Integer] = (((Triggering player) Current gold) / 10)
-------- ------------------------ --------
-------- Item Data --------
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = Item_List_Array_BitsRq
Trigger - Run Find ItemValue to NPSData <gen> (checking conditions)
-------- ------------------------ --------
-------- Hero Level Data --------
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = 7
Set NPS_Data_Int[Temp_Integer] = (Hero level of Player_Hero_Array[(Player number of (Triggering player))])
-------- ------------------------ --------
-------- Hero Skill Pts Data --------
Set Temp_Integer = (Temp_Integer + 1)
-------- NOTE: because we give 0 bits to this it will take up 0 space in our array so in other words this is not included in the code it just shows a easy way to not save some data but leave in the code for usage later --------
Set NPS_Data_Int_BitsRq[Temp_Integer] = 0
Set NPS_Data_Int[Temp_Integer] = Player_Skill_Points_Array[(Player number of (Triggering player))]
-------- ------------------------ --------
-------- Hero Upgrade Pts Data --------
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = 0
Set NPS_Data_Int[Temp_Integer] = Player_UpgradePts_Array[(Player number of (Triggering player))]
-------- ------------------------ --------
-------- Hero Str --------
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = 8
Set NPS_Data_Int[Temp_Integer] = (Strength of Player_Hero_Array[(Player number of (Triggering player))] (Exclude bonuses))
-------- ------------------------ --------
-------- Hero Agi --------
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = 8
Set NPS_Data_Int[Temp_Integer] = (Agility of Player_Hero_Array[(Player number of (Triggering player))] (Exclude bonuses))
-------- ------------------------ --------
-------- Hero Int --------
Set Temp_Integer = (Temp_Integer + 1)
Set NPS_Data_Int_BitsRq[Temp_Integer] = 8
Set NPS_Data_Int[Temp_Integer] = (Intelligence of Player_Hero_Array[(Player number of (Triggering player))] (Exclude bonuses))
-------- ------------------------ --------
-------- DO NOT EDIT UNDER THIS POINT --------
Set NPS_Data_EntryCount = Temp_Integer
Set NPS_Data_Int_BitsRq[(NPS_Data_EntryCount + 1)] = NPS_Data_Error_Bits


Next is Load Data


NPS L Write Data to Unit
Events
Conditions
Actions
Set Temp_Integer = 0
-------- ------------------------ --------
-------- ------------------------ --------
Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
-------- Hero Data --------
Set Temp_Integer = (Temp_Integer + 1)
Unit - Create 1 Class_List_Array[NPS_Data_Int_BitsRq[Temp_Integer]] for (Triggering player) at (Center of Location Choosing <gen>) facing Default building facing degrees
Set Player_Hero_Array[(Player number of (Triggering player))] = (Last created unit)
Selection - Select (Last created unit) for (Triggering player)
Camera - Lock camera target for (Owner of (Triggering unit)) to (Triggering unit), offset by (0.00, 0.00) using Default rotation
-------- ------------------------ --------
-------- Gold Data --------
Set Temp_Integer = (Temp_Integer + 1)
Player - Set (Triggering player) Current gold to (NPS_Data_Int[Temp_Integer] x 10)
-------- ------------------------ --------
-------- ------------------------ --------
-------- Item Data --------
-------- For each Integer A ------ FIX ------ For some reason any use of For each Integer A loops can malfunction (If there is another trigger which uses Hero aquires item Event) I have changed this to B in hopes that if you wont use it in this case. --------
For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions
Set Temp_Integer = (Temp_Integer + 1)
Item - Create Item_List_Array[NPS_Data_Int[Temp_Integer]] at (Center of (Playable map area))
Hero - Give (Last created item) to (Last created unit)
-------- ------------------------ --------
-------- Hero Level Data --------
Set Temp_Integer = (Temp_Integer + 1)
Hero - Set (Last created unit) Hero-level to NPS_Data_Int[Temp_Integer], Hide level-up graphics
Set Player_Level_Array[(Player number of (Triggering player))] = NPS_Data_Int[Temp_Integer]
-------- ------------------------ --------
-------- Hero Skill Pts Data --------
Set Temp_Integer = (Temp_Integer + 1)
Set Player_Skill_Points_Array[(Player number of (Triggering player))] = NPS_Data_Int[Temp_Integer]
-------- ------------------------ --------
-------- ------------------------ --------
-------- Hero Upgrade Pts Data --------
Set Temp_Integer = (Temp_Integer + 1)
Set Player_UpgradePts_Array[(Player number of (Triggering player))] = NPS_Data_Int[Temp_Integer]
-------- ------------------------ --------
-------- ------------------------ --------
-------- Hero Str --------
Set Temp_Integer = (Temp_Integer + 1)
Hero - Modify Strength of Player_Hero_Array[(Player number of (Triggering player))]: Set to NPS_Data_Int[Temp_Integer]
-------- ------------------------ --------
-------- ------------------------ --------
-------- Hero Agi --------
Set Temp_Integer = (Temp_Integer + 1)
Hero - Modify Agility of Player_Hero_Array[(Player number of (Triggering player))]: Set to NPS_Data_Int[Temp_Integer]
-------- ------------------------ --------
-------- ------------------------ --------
-------- Hero Int --------
Set Temp_Integer = (Temp_Integer + 1)
Hero - Modify Intelligence of Player_Hero_Array[(Player number of (Triggering player))]: Set to NPS_Data_Int[Temp_Integer]
-------- ------------------------ --------
06-10-2005, 03:35 AM#4
j0sh4tran
I could use some help
06-11-2005, 03:08 PM#5
j0sh4tran
I guess no one knows how to fix this problem =(
07-21-2005, 06:15 PM#6
MeTaCo
Why not just download E-lilz save code? Google E-lilz and you'll find it, it's far easier to edit elilz :) It uses bit system, and u can modify it if you take the time to read over the instructions, altho 1 thing is that it only works for 1 or 2 players, but that can be modified, I modified it :)