# Unable to Reference function from non-parent class

**URL:** <https://forum.kirupa.com/t/unable-to-reference-function-from-non-parent-class/324983>\
**Category:** flash\
**Created:** [September 20, 2011, 1:30am UTC](https://forum.kirupa.com/t/unable-to-reference-function-from-non-parent-class/324983 "2011-09-20T01:30:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![selacius](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@selacius](https://forum.kirupa.com/u/selacius)\
**Post date:** [September 20, 2011, 1:30am UTC](https://forum.kirupa.com/t/unable-to-reference-function-from-non-parent-class/324983/1 "2011-09-20T01:30:15Z")

</div>

So I am trying to access a variable that is defined within my parent code from a class which has been called from my parent code. I am using this:

```auto

TileCode(parent).game_quests.add_quest(0);

```

to try to access the game\_quests variable (which is defined within TileCode). However, for some reason it is not picking that up. It is working for other variables which I have called and ran in a similar fashion.  
What could be the cause of this?
