# get member variables from another verse file

**URL:** <https://forums.unrealengine.com/t/get-member-variables-from-another-verse-file/836259>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [March 31, 2023, 8:34pm UTC](https://forums.unrealengine.com/t/get-member-variables-from-another-verse-file/836259 "2023-03-31T20:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [March 31, 2023, 8:34pm UTC](https://forums.unrealengine.com/t/get-member-variables-from-another-verse-file/836259/1 "2023-03-31T20:34:00Z")

</div>

I decided I wanted to move some functions over to another file, `getmoves.verse`. But how would I have access to the `AllPieces` var without passing this as a parameter to the functions?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/f/77f6945fe359636d43ecb3faf49c567fbae6909b.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/0/750843b69d91dcedf83dbcb32bb83cdefb08569a.png)

---

<div class="post-metadata">

**Author:** ![spentak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/spentak/32/642372_2.png) [@spentak](https://forums.unrealengine.com/u/spentak)\
**Post date:** [April 1, 2023, 5:05am UTC](https://forums.unrealengine.com/t/get-member-variables-from-another-verse-file/836259/2 "2023-04-01T05:05:52Z")

</div>

Your `main` class is a `creative_device` and it’s purpose is to be created “spawned” and put into the game.

`AllPieces` is a member variable that is part of a single instantiated creative\_device

It looks like you made some public floating functions. The point of functions in Verse are to be available without having to be tied to an instance of a class. Therefore, they can’t modify a `member` of an instantiated class directly.

You’ll want to create an argument for `AllPieces` if you really want those public functions.

So I think:  
Option 1: Move your functions back into the `main` class OR  
Option 2: Modify those functions to take a parameter for `AllPieces : [] chess_piece`

Your issue isn’t a Verse thing as much as it is a code design thing (this same situation would happen in most compiled languages)
