I need some serious help making my map compatible with patch 1.24. I don't understand the return thing that they changed. I originally created the map with WEU and spent the last few days removing everything WEU related and as of now the map WILL load with regular map editor.
There is a tutorial on this on wc3.net and I followed it, but was confused @ the end of it and the site is down.
====================================================================
That tutorial states:
====================================================================
I explained this in the other thread, but rather quickly. This will help you find out the functions that make warcraft III unable to play your map, without doing any brute force, there is one exception though, and it is that World editor sometimes crashes. If one of the functions in your map causes this crash, then you are doomed to brute force. The good thing is that this seem to be the exception rather than the rule.
Requirements
* First of all, you need to be able to run World Editor.
* Then you need patch's 1.24's blizzard.j . Because for some reason it is not obvious to some people how to get it, I am attaching a zip file that includes that file.
* Finally, you need your map's war3map.j , there are many ways to get it, but I'll explain one that requires newgen pack. If you don't want to use newgen pack, then you'll have to use a MPQ editor to extract war3map.j from your map.
Getting the map's script
* Open your map in newgen pack, save the map. Make sure jasshelper doesn't give you any errors. If it does, fix them...
* Go to your newgen pack's folder, then to the logs\ subfolder. You will find a file called outputwar3map.j in there, open it with a text editor.
Merging the map script with blizzard.j
This could be done with a tool, I think jasshelper can do it, but well, it is easy to do it manually...
Make a copy of blizzard.j then open it and outputwar3map.j in a text editor, the merge process is easy, you'll find your map's script has a lot of globals inside a single globals block:
Collapse JASS:
globals
.. tons of stuff ! ..
endglobals
Select all the contents of this globals block, and Copy it to the clipboard. Then go to the blizzard.j copy, you will find a globals block in it as well. Find the bottom of blizzard.j's globals, and paste your map's globals just before endglobals
Collapse JASS:
boolexpr filterMeleeTrainedUnitIsHeroBJ = null
boolexpr filterLivingPlayerUnitsOfTypeId = null
// Memory cleanup vars
boolean bj_wantDestroyGroup = false
... tons of stuff from outputwar3map.j
endglobals
Finally, go to your outputwar3map.j, and go bellow the endglobals keyword, select all the contents bellow it (a lot of functions) copy it to the clipboard, head to the blizzard.j copy and then go to the end of the file. Paste your map's functions there.
Save the blizzard.j copy as "your\warcraft III folder\scripts\blizzard.j"
Getting the errors
Now open NORMAL World editor, create an empty map, and save the map.
* If WE crashes, you are doomed, stick to bruteforce.
* If the map is saved and no errors are shown, you didn't follow this tutorial correctly.
* If WE shows you an error that says "Expected a name" and the error line says something like "function InitGlobals" then either your map's issues are not caused by Jass but by something else (unlikely) or you didn't follow this tutorial correctly.
* If WE shows you an error that says "Unexpected type" or something like that with the word "type" in it. And the error line shown in the code preview is the beginning of the map's script, while the actual line number in the error is very high, then congratulations! You can find out what's your problem.
Find the problems
Notice the high line number ( Line XXX: blah blah blah, get the XXX) then go to the blizzard.j copy at the scripts folder, and go to line XXX, this line will be inside a function. Something like:
Collapse JASS:
function a takes boolean b returns something
blah blah blah
return onething
blah blah blah
return maybemorereturns
return otherthing
endif
Copy the contents of this function to some new text file, then remove all the returns but the last one (in scripts\blizzard.j) save scripts\blizzard.j and then save the empty map again.
If WE tells you "expected a name" and the line in the code preview says "function InitGlobals" then you have found all the problems in your map, if it again tells you something about a bad type, and a high line number, you have to repeat this step.
Fix the problems
If you did everything correctly and your computer contributed to the process, now you have a file containing all the functions that cause problems in your map. Now you have to find out what system/trigger/whatever is generating them, and then go and fix the function in the system/trigger/whatever. If the /whatever was made by someone else and you can't understand the code, request this someone else to fix it for you (maybe he actually has already updated it for 1.24). If the function is yours, you'll have to fix it. It is easy, just modify the function so that there is only one return stament, use variables and modify the structure of the function. If you have no idea where the function comes from, then you have a problem. Go to the problems section.
Problems
If your map crashes or you have no idea where one of the bugged functions comes from, you can actually post your map + outputwar3map.j in a zip in the pastebin and send me the link. There are some conditions:
* The map should have used vJass or a system/spell made by me, if not then you can go to heck, I won't spend my time on helping you...
* You should have tried this tutorial, if the map doesn't crash then I hope you provide me the text file containing the bugged functions, else the map MUST crash...
====================================================================
====================================================================
What I don't understand is when is says "Notice the high line number ( Line XXX: blah blah blah, get the XXX) then go to the blizzard.j copy at the scripts folder, and go to line XXX, this line will be inside a function."
How do you find that line in the blizzard.j copy? When you have it opened in notepad, there is no way to find the specific line it's referring too.
I will upload the map, the modified blizzard.j, and the outputwar3map.j file from my map, for those of you that want to follow the tutorial above.
I am at a stand still, as I don't know how to fix my map to make it run with patch 1.24. I have done all of the triggers in GUI, not JASS.
I have no problem fixing the errors myself, BUT I don't understand what problem is. I know it has something to do with JASS returns, but I don't know what it looks like in GUI format.
Can someone please either explain the GUI triggers I need to fix or fix this for me? I will be eternally grateful and even add your name to the map's special thanks if you want.
I am at my wits end!
There is a tutorial on this on wc3.net and I followed it, but was confused @ the end of it and the site is down.
====================================================================
That tutorial states:
====================================================================
I explained this in the other thread, but rather quickly. This will help you find out the functions that make warcraft III unable to play your map, without doing any brute force, there is one exception though, and it is that World editor sometimes crashes. If one of the functions in your map causes this crash, then you are doomed to brute force. The good thing is that this seem to be the exception rather than the rule.
Requirements
* First of all, you need to be able to run World Editor.
* Then you need patch's 1.24's blizzard.j . Because for some reason it is not obvious to some people how to get it, I am attaching a zip file that includes that file.
* Finally, you need your map's war3map.j , there are many ways to get it, but I'll explain one that requires newgen pack. If you don't want to use newgen pack, then you'll have to use a MPQ editor to extract war3map.j from your map.
Getting the map's script
* Open your map in newgen pack, save the map. Make sure jasshelper doesn't give you any errors. If it does, fix them...
* Go to your newgen pack's folder, then to the logs\ subfolder. You will find a file called outputwar3map.j in there, open it with a text editor.
Merging the map script with blizzard.j
This could be done with a tool, I think jasshelper can do it, but well, it is easy to do it manually...
Make a copy of blizzard.j then open it and outputwar3map.j in a text editor, the merge process is easy, you'll find your map's script has a lot of globals inside a single globals block:
Collapse JASS:
globals
.. tons of stuff ! ..
endglobals
Select all the contents of this globals block, and Copy it to the clipboard. Then go to the blizzard.j copy, you will find a globals block in it as well. Find the bottom of blizzard.j's globals, and paste your map's globals just before endglobals
Collapse JASS:
boolexpr filterMeleeTrainedUnitIsHeroBJ = null
boolexpr filterLivingPlayerUnitsOfTypeId = null
// Memory cleanup vars
boolean bj_wantDestroyGroup = false
... tons of stuff from outputwar3map.j
endglobals
Finally, go to your outputwar3map.j, and go bellow the endglobals keyword, select all the contents bellow it (a lot of functions) copy it to the clipboard, head to the blizzard.j copy and then go to the end of the file. Paste your map's functions there.
Save the blizzard.j copy as "your\warcraft III folder\scripts\blizzard.j"
Getting the errors
Now open NORMAL World editor, create an empty map, and save the map.
* If WE crashes, you are doomed, stick to bruteforce.
* If the map is saved and no errors are shown, you didn't follow this tutorial correctly.
* If WE shows you an error that says "Expected a name" and the error line says something like "function InitGlobals" then either your map's issues are not caused by Jass but by something else (unlikely) or you didn't follow this tutorial correctly.
* If WE shows you an error that says "Unexpected type" or something like that with the word "type" in it. And the error line shown in the code preview is the beginning of the map's script, while the actual line number in the error is very high, then congratulations! You can find out what's your problem.
Find the problems
Notice the high line number ( Line XXX: blah blah blah, get the XXX) then go to the blizzard.j copy at the scripts folder, and go to line XXX, this line will be inside a function. Something like:
Collapse JASS:
function a takes boolean b returns something
blah blah blah
return onething
blah blah blah
return maybemorereturns
return otherthing
endif
Copy the contents of this function to some new text file, then remove all the returns but the last one (in scripts\blizzard.j) save scripts\blizzard.j and then save the empty map again.
If WE tells you "expected a name" and the line in the code preview says "function InitGlobals" then you have found all the problems in your map, if it again tells you something about a bad type, and a high line number, you have to repeat this step.
Fix the problems
If you did everything correctly and your computer contributed to the process, now you have a file containing all the functions that cause problems in your map. Now you have to find out what system/trigger/whatever is generating them, and then go and fix the function in the system/trigger/whatever. If the /whatever was made by someone else and you can't understand the code, request this someone else to fix it for you (maybe he actually has already updated it for 1.24). If the function is yours, you'll have to fix it. It is easy, just modify the function so that there is only one return stament, use variables and modify the structure of the function. If you have no idea where the function comes from, then you have a problem. Go to the problems section.
Problems
If your map crashes or you have no idea where one of the bugged functions comes from, you can actually post your map + outputwar3map.j in a zip in the pastebin and send me the link. There are some conditions:
* The map should have used vJass or a system/spell made by me, if not then you can go to heck, I won't spend my time on helping you...
* You should have tried this tutorial, if the map doesn't crash then I hope you provide me the text file containing the bugged functions, else the map MUST crash...
====================================================================
====================================================================
What I don't understand is when is says "Notice the high line number ( Line XXX: blah blah blah, get the XXX) then go to the blizzard.j copy at the scripts folder, and go to line XXX, this line will be inside a function."
How do you find that line in the blizzard.j copy? When you have it opened in notepad, there is no way to find the specific line it's referring too.
I will upload the map, the modified blizzard.j, and the outputwar3map.j file from my map, for those of you that want to follow the tutorial above.
I am at a stand still, as I don't know how to fix my map to make it run with patch 1.24. I have done all of the triggers in GUI, not JASS.
I have no problem fixing the errors myself, BUT I don't understand what problem is. I know it has something to do with JASS returns, but I don't know what it looks like in GUI format.
Can someone please either explain the GUI triggers I need to fix or fix this for me? I will be eternally grateful and even add your name to the map's special thanks if you want.
I am at my wits end!