# Data definitions at class scope must specify their value domain

**URL:** <https://forums.unrealengine.com/t/data-definitions-at-class-scope-must-specify-their-value-domain/1642503>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [January 25, 2024, 10:19pm UTC](https://forums.unrealengine.com/t/data-definitions-at-class-scope-must-specify-their-value-domain/1642503 "2024-01-25T22:19:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lookingforvlad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lookingforvlad](https://forums.unrealengine.com/u/lookingforvlad)\
**Post date:** [January 25, 2024, 10:19pm UTC](https://forums.unrealengine.com/t/data-definitions-at-class-scope-must-specify-their-value-domain/1642503/1 "2024-01-25T22:19:50Z")

</div>

I’m triyng to create class and create variable of this class. I don’t know why I recieved this error.

I have this code:

```
hi<public> := class():
    New<public> : int = 0
    By<public> : string = ""

MyHi := Material.hi{New := 0, By := ""}

```

I recieved this error: Data definitions at class scope must specify their value domain.

---

<div class="post-metadata">

**Author:** ![Jeremy\_Choud](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jeremy_choud/32/907645_2.png) [@Jeremy\_Choud](https://forums.unrealengine.com/u/Jeremy_Choud)\
**Post date:** [January 31, 2024, 3:44am UTC](https://forums.unrealengine.com/t/data-definitions-at-class-scope-must-specify-their-value-domain/1642503/2 "2024-01-31T03:44:52Z")

</div>

MyHi : hi = Material.hi{New := 0, By := “”}

try that. you usually have to specify type so i’d think you’d have to specify the class as well

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 1, 2024, 3:45am UTC](https://forums.unrealengine.com/t/data-definitions-at-class-scope-must-specify-their-value-domain/1642503/3 "2024-03-01T03:45:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
