In particular, tell us exactly how to call your code to see the error.
Also, can I suggest using more descriptive variable names and following the Julia variable naming conventions: Style Guide · The Julia Language
This will not only help us understand your code so we can help you, it will help you write maintainable code in the long run.