# What is causing this undefined variable Error message

**URL:** <https://discourse.julialang.org/t/what-is-causing-this-undefined-variable-error-message/122429>\
**Category:** New to Julia\
**Created:** [November 8, 2024, 6:17pm UTC](https://discourse.julialang.org/t/what-is-causing-this-undefined-variable-error-message/122429 "2024-11-08T18:17:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)\
**Post date:** [November 8, 2024, 6:36pm UTC](https://discourse.julialang.org/t/what-is-causing-this-undefined-variable-error-message/122429/2 "2024-11-08T18:36:22Z")

</div>

Hi,

Currently the code you posted is not properly formatted, making it hard to read. Please edit it, cf. instructions here:

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…

Additionally, it would also help if you would post the full error message, and reduce the code as much as possible to obtain a minimal working example (resulting in the same error). Check out

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

_[View the full topic](https://discourse.julialang.org/t/what-is-causing-this-undefined-variable-error-message/122429)._
