Try counting the numbers of { and the number of } and make sure they match up, otherwise you're going to get all sorts of funny errors.

Also, make sure that you're using the latest version of shaderED - if you're still using the one that came with the JO SDK then there a lot of features missing (GLOW being one) that the JO version doesn't like.

Finally, as mentioned in a separate post, a lot of new features are being written into q3map2 all the time and shaderED2 hasn't had time to catch up. Make sure that if you're using these new features, add them through notepad AFTER editing the shader in shaderED or the editor will remove them from your shader script.

EDIT: Does anyone think it would be a good idea to have the source for shaderED released? That way, when we get new features added through the compiler, we'll be able to add them to the Editor.