# "Class has no field" Error

**URL:** https://community.haxe.org/t/class-has-no-field-error/472
**Category:** Haxe
**Tags:** haxedevelop
**Created:** [February 26, 2018, 2:39pm UTC](https://community.haxe.org/t/class-has-no-field-error/472 "2018-02-26T14:39:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Doppp](https://avatars.discourse-cdn.com/v2/letter/d/ed655f/32.png) [@Doppp](https://community.haxe.org/u/Doppp)
#### Post date: [February 26, 2018, 2:39pm UTC](https://community.haxe.org/t/class-has-no-field-error/472/1 "2018-02-26T14:39:51Z")

</div>

I’m not sure if this is related to this [issue](https://github.com/HaxeFoundation/haxe/issues/6000) but I’m getting this error in HaxeDevelop, albeit unrelated to macros. I created a new class called Helper in the same directory as another class called Model and used one of the methods in the Helper class in Model and get this error. I am new to Haxe so it might be that I’m doing something stupid but I’m struggling to rectify this issue. Do I have to use `static` on the methods in the Helper class?

![HaxeDevelop_2018-02-26_21-52-42](https://community.haxe.org/uploads/default/original/1X/0018b8b34841a371c91c55add29ed5f721c766c9.png)

---

<div class="post-metadata">

### Author: ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)
#### Post date: [February 26, 2018, 4:05pm UTC](https://community.haxe.org/t/class-has-no-field-error/472/2 "2018-02-26T16:05:10Z")

</div>

> [@Doppp](#):
>
> Do I have to use static on the methods in the Helper class?

Yes, otherwise you need to create an instance of `Helper` to call `Random()`.

---

<div class="post-metadata">

### Author: ![Doppp](https://avatars.discourse-cdn.com/v2/letter/d/ed655f/32.png) [@Doppp](https://community.haxe.org/u/Doppp)
#### Post date: [February 26, 2018, 6:28pm UTC](https://community.haxe.org/t/class-has-no-field-error/472/3 "2018-02-26T18:28:12Z")

</div>

Thank you, it works! 🙂
