Edit: because of the big message, I split it into a few paragraphs so you can tl;dr if you'd like xD
Intro:
Here's a hint: if you go to File -> Preferences a menu will pop up with several tabs, in the "general" tab make sure the value "Automatically create unknown variables while pasting trigger data" is checked (enabled).
If that is enabled, all you have to do is copy the triggers (or even easier: the category the triggers belong to) and paste them in your map, all variables will automatically be created.
There is 1 noticeable exception: if that variable is only used in JASS (Custom script), on the same note a variable can have a different type than it actually has because it's used in a 'strange' way.
In this case, the problem is that you either forgot the variable "handleId", or that the world editor automatically created it as a handle variable (instead of a integer variable, which it should've been).
So adding the variable "handleId" with as type integer should do the trick.
How to solve the problem:
You're completely correct about the different types of walls
The order when constructing any custom building is "custom_RAWID".
To see the Raw ID of a unit, press CTRL + D in the object editor (the fortified walls are h00Q and h00H for example).
So in the trigger "Build Wall", you see the action "Set constructOrder = farm", that constructOrder should change depending on what direction you're casting the ability in and which unit is casting it (I believe that 1 unit cannot build both type of walls? Otherwise you'd have to create an extra ability).
The direction is "constructionAngle" (which is always a multiple of 90).
In any case, here's an example of how it should be changed:
if the builder is the industrial one and the direction is either 90 or 270, set constructOrder to "custom_h00Q", else set it to "custom_h00H".
Do the same for the other builder (but change the constructOrder of course).
I hope this makes sense. If you didn't understand this, I'd be glad to add it for you ^^
Unrelated
On an unrelated note, I'd like to congratulate you on your brilliant use of the object editor categories
I've been repeating it over and over again that units that belong to the same race should be in the same category, yet many people fail to do this.
So thank you for raising my hopes in that regard.
The triggers do need quite a lot of improvement though
(some of them are nice, but others really aren't).
I actually believe you could combine all those alliance triggers into 1 trigger (which is, strangely enough, not even that much bigger than just 1 of those triggers if my brain is visualizing the trigger correctly).
But you didn't come here for that I guess.