# LoadError: UndefVarError: model not defined

**URL:** https://discourse.julialang.org/t/loaderror-undefvarerror-model-not-defined/68465
**Category:** General Usage
**Tags:** agents
**Created:** [September 20, 2021, 2:00pm UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-model-not-defined/68465 "2021-09-20T14:00:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)
#### Post date: [September 20, 2021, 2:00pm UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-model-not-defined/68465/1 "2021-09-20T14:00:13Z")

</div>

When trying to run the example `schoolyard.jl` from `Agents.jl` I have this problem in the last line:

`fig, _, _ = abm_data_exploration(model, agent_step!, dummystep, sliders; static_preplot!)`

---

<div class="post-metadata">

### Author: ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)
#### Post date: [September 20, 2021, 5:03pm UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-model-not-defined/68465/2 "2021-09-20T17:03:05Z")

</div>

Try `model = schoolyard()`

I did that in the REPL, forgot to put it in the file for you to follow sorry.
