# GetPlayspace() cannot be used within \<concrete\> class for instantiation

**URL:** <https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, editor, question, fortnite\
**Created:** [September 27, 2023, 9:30am UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915 "2023-09-27T09:30:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![HAMU\_VERSE\_JP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hamu_verse_jp/32/724287_2.png) [@HAMU\_VERSE\_JP](https://forums.unrealengine.com/u/HAMU_VERSE_JP)\
**Post date:** [September 27, 2023, 9:30am UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/1 "2023-09-27T09:30:55Z")

</div>

I want to get the Playspace and AllPlayers constants to get information about all players in the class for instantiation, but the parentheses of GetPlayspace() turn into red wavy lines.

How I get all palyers information(player) in the class for instantiation?

```auto
    weapon_changer := class<concrete>:

    @editable
    Weapon_Select_Button : button_device = button_device{}

    @editable
    Weapon_Granter : item_granter_device = item_granter_device{}

        init():void=
            Weapon_Select_Button.InteractedWithEvent.Subscribe(fun_Grant_Weapon)

        fun_Grant_Weapon(Agent:agent):void=
            Playspace : fort_playspace = GetPlayspace() <- Red wavy line at "()"
            AllPlayers : []player = Playspace.GetPlayers()
            for (Player : AllPlayers):
                Weapon_Granter.GrantItem(Player)

```

Error message:  
This function parameter expects a value of type tuple(creative\_object\_interface,tuple(),tuple()),  
but argument is an incompatible value of type tuple(weapon\_changer,tuple(),tuple()).)

---

<div class="post-metadata">

**Author:** ![LoPing](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loping/32/737300_2.png) [@LoPing](https://forums.unrealengine.com/u/LoPing)\
**Post date:** [September 27, 2023, 3:33pm UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/2 "2023-09-27T15:33:54Z")

</div>

Looks like you are using the wrong argument type in your function. With this type of error you may want to refer to epic’s definition of the function you are listening to. Not every function uses the actor parameter, though many do.

---

<div class="post-metadata">

**Author:** ![PiEqualsThree3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PiEqualsThree3](https://forums.unrealengine.com/u/PiEqualsThree3)\
**Post date:** [September 27, 2023, 3:45pm UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/3 "2023-09-27T15:45:05Z")

</div>

GetPlayspace() is a function reserved for classes that implement creative\_device / `creative_object_interface`, which your class does not. If do  
`weapon_changer := class(creative_device): `  
it should work

---

<div class="post-metadata">

**Author:** ![Ep8Script](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ep8script/32/1170494_2.png) [@Ep8Script](https://forums.unrealengine.com/u/Ep8Script)\
**Post date:** [September 27, 2023, 4:22pm UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/4 "2023-09-27T16:22:29Z")

</div>

You might also be able to do `creative_device{}.GetPlayspace()`

If that causes an error it may only work on Creative objects instantiated by Fortnite (since Verse will be open to more than just Fortnite eventually), but in that case it should’ve probably been failable…

---

<div class="post-metadata">

**Author:** ![HAMU\_VERSE\_JP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hamu_verse_jp/32/724287_2.png) [@HAMU\_VERSE\_JP](https://forums.unrealengine.com/u/HAMU_VERSE_JP)\
**Post date:** [September 27, 2023, 10:36pm UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/5 "2023-09-27T22:36:46Z")

</div>

GetPlayspace is inherited from creative\_device, so it can only be used within creative\_device.  
I would like to learn more about the definition of Fortnite.digest.verse.  
thank you very much.

---

<div class="post-metadata">

**Author:** ![HAMU\_VERSE\_JP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hamu_verse_jp/32/724287_2.png) [@HAMU\_VERSE\_JP](https://forums.unrealengine.com/u/HAMU_VERSE_JP)\
**Post date:** [September 27, 2023, 10:40pm UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/6 "2023-09-27T22:40:01Z")

</div>

This means that it cannot be used in the class.  
I decided to respond by instantiating creative\_device itself.  
(I can’t believe I can instantiate creative\_device itself!)

---

<div class="post-metadata">

**Author:** ![HAMU\_VERSE\_JP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hamu_verse_jp/32/724287_2.png) [@HAMU\_VERSE\_JP](https://forums.unrealengine.com/u/HAMU_VERSE_JP)\
**Post date:** [September 27, 2023, 10:54pm UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/7 "2023-09-27T22:54:26Z")

</div>

thank you very much.  
When I tried it, I still got an error with just the parent device, so I was able to succeed by also placing the creative\_device on the instantiation side!

---

<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:** [October 27, 2023, 10:54pm UTC](https://forums.unrealengine.com/t/getplayspace-cannot-be-used-within-concrete-class-for-instantiation/1313915/8 "2023-10-27T22:54:52Z")

</div>

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