HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Save/load gone wrong

09-12-2007, 09:52 PM#1
k0n0
This might me a lot to ask but can someone download my map and check whats wrong with my save/load trigger? My friend sent it to me but i dont know how to do it all..So could you maybe fix it and send it back to me? that would be great please...
Attached Files
File type: w3xkono.w3x (1.8 MB)
09-12-2007, 10:19 PM#2
Pytho
How about trying it yourself first?
It might help you in this certain case, if someone looks at your script and tells you whats wrong and so on. But I think it will help you even more, if you try it yourself. Include some debug messages, which means to display the values of some variables and so on, so you can find the place where something goes wrong. And if you don't find your error afterwards, copy the trigger in which you think the error occurs and show it to us here. Then it's easier for us to help you and you don't need someone who does all your work.
09-12-2007, 10:42 PM#3
k0n0
Well my friend put it in JASS form so i have no idea to where to even start..Im most familiar with GUI.. When i try to save my map anyways i get like 205 compile errors and i dont know what to do fix them..Im not asking for someone to do all the work..I think it would be alot easier to learn JASS if it was already fixed..
09-12-2007, 10:45 PM#4
botanic
post the script, Also check to make sure you have all the variables you need, as that is a common starting JASS problem for people.

If you want AIM me in about 2 hours when I get home and I will walk you through it.

PS: My AIM is botanicvelious
09-12-2007, 11:21 PM#5
TaintedReality
Quote:
Well my friend put it in JASS form so i have no idea to where to even start..Im most familiar with GUI.. When i try to save my map anyways i get like 205 compile errors and i dont know what to do fix them..Im not asking for someone to do all the work..I think it would be alot easier to learn JASS if it was already fixed..

Tell us what the first error is. Most of the errors after that will go away once you fix the first one. Also, if your friend gave it to you get him to make it work =P.
09-13-2007, 05:03 AM#6
k0n0
Ok well the first error says

Line 2022: Expected a fuction name

call InitLetters()
09-13-2007, 06:16 AM#7
Captain Griffen
InitLetters is either not a function, or is declared after it is called.
09-13-2007, 08:05 AM#8
botanic
like I said post the trigger

EDIT: ok I was feeling generous so I looked at the map and like at least 1/2 of the trigger seems to be missing :/
09-13-2007, 04:56 PM#9
k0n0
GAH!!! Im to noob with jass to make a save/load..I can finally host maps and now all i want to do is make a good RPG >.<
09-13-2007, 06:12 PM#10
k0n0
Ok this is what i got so far.. Its based of Vexorian's save/load 0.5 but what i want to know is how to make it where they type -load (password) and it loads there clone char?? please help

Trigger:
Load Hero
Collapse Events
Player - Player 1 (Red) types a chat message containing -load as An exact match
Collapse Conditions
(Owner of (Triggering unit)) Equal to (Matching player)
Collapse Actions
Set tmPlayer = (Owner of (Triggering unit))
Game - Display to (All players) the text: <Empty String>
Custom script: set udg_TemString=Codemaker_AskString(udg_tmPlayer,"Enter Password: /password <code> or use /cancel (all is case sensitive)", "/password ","/cancel",100)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Length of TemString) Not equal to 0
Collapse Then - Actions
Set tmp_point = (Position of (Triggering unit))
Custom script: set udg_TemString=Codemaker_Serial2Code(udg_TemString, "-")
Custom script: set udg_tmInt = HeroSave_LoadHeroLoc(udg_tmPlayer,udg_TemString, udg_tmp_point, 0)
Custom script: call RemoveLocation(udg_tmp_point)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
tmInt Not equal to 0
Collapse Then - Actions
Game - Display to (All players) the text: (Unable to load hero, Error + (String(tmInt)))
Skip remaining actions
Else - Actions
Game - Display to (All players) the text: ((Name of (Last created unit)) + Loaded Succesfully)
Else - Actions



and then:

Trigger:
Clone Hero
Collapse Events
Player - Player 1 (Red) types a chat message containing -load as An exact match
Collapse Conditions
(Ability being cast) Equal to Fire Slash
Collapse Actions
Set tmPlayer = (Owner of (Triggering unit))
Custom script: set udg_TemString =HeroSave_SaveHero( GetSpellTargetUnit())
Custom script: call BJDebugMsg( "[CLone Hero] "+ Codemaker_Code2Serial(udg_TemString,"-",4,"FFAAAAAA" , "FF0055FF", "FFFFFF00" ) )
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Length of TemString) Not equal to 0
Collapse Then - Actions
Set tmp_point = (Position of (Triggering unit))
Custom script: set udg_tmInt = HeroSave_LoadHeroLoc(udg_tmPlayer,udg_TemString, udg_tmp_point, 0)
Custom script: call RemoveLocation(udg_tmp_point)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
tmInt Not equal to 0
Collapse Then - Actions
Game - Display to (All players) the text: (Unable to clone hero, Error + (String(tmInt)))
Skip remaining actions
Else - Actions
Game - Display to (All players) the text: ((Name of (Last created unit)) + Cloned Succesfully)
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Items\AIil\AIilTarget.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
09-13-2007, 10:51 PM#11
TaintedReality
It sounds like you're just copying things without having any understanding of how they work. That's not good ^^. Try doing some tutorials:

http://www.wc3campaigns.net/showthread.php?t=78969
09-14-2007, 12:30 AM#12
k0n0
WOW thanks i spent 2 hours on learning and using the save/load just to find out it doesnt work on my map nor his pre made one woot!!
09-14-2007, 02:50 AM#13
botanic
um vex's save load thing does work :/
09-14-2007, 04:00 AM#14
k0n0
Im talking about the link Tainted gave me..
09-14-2007, 04:17 AM#15
botanic
here use this one

http://world-editor-tutorials.thehel...php?view=37153