I feel like a grade-A retard. I can't get any of these scripts to work!

I have a project script file, GL-Main.wdl

I have transparency/culling script file for the scripts here, tree1.wdl

Both are in my work directory.

My GL-Main.wdl file has an "include" entry for tree1.wdl

tree1.wdl shows up in WED when I open the project manager and look at the added scripts.

I can even build the level with no script errors (I made the mistake previously of thinking I needed seperate script files for each set of brackets, but I changed that as mentioned above to make it all in 1 wdl file, tree1.wdl).

The problem is that I still get this messed up sorting, where pieces of branch leaves on the far side of the tree can be seen as if the leaves on the near side are transparent, like a hole (if I move up close the the area and move around, I can see the near branches move in and out of transparency, so I know there's a sorting problem).

I'm a total noob to scripting, but I thought I had the basics in as per this thread... Please if anyone can help, I'd really appreciate it, seeing as how I've already spent hours trying to figure this out already, and it's probably something really simple.