Try MeGUI's Tools > AVS Script Creator.
Gives me the same kind of error.
edit: k I tried various stuff and got rid of all the errors I got. It's encoding right now and hope it doesn't go wrong. But whether it will
or not this might help for problems:
-try different versions of MeGUI
-try different versions of AviSynth,
but not lower than 2.5!-try different versions of x264
-if you get an error involving AviSynth all the time, try the things above, if they don't help, THEN try updating your MeGUI.