# Returning an INT

**URL:** <https://forum.kirupa.com/t/returning-an-int/283904>\
**Category:** flash\
**Created:** [March 12, 2009, 10:30am UTC](https://forum.kirupa.com/t/returning-an-int/283904 "2009-03-12T10:30:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ersk](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Ersk](https://forum.kirupa.com/u/Ersk)\
**Post date:** [March 12, 2009, 10:30am UTC](https://forum.kirupa.com/t/returning-an-int/283904/1 "2009-03-12T10:30:18Z")

</div>

Hi guys, I’m getting an error and I have no idea why. Below is the code thats causing the problem.

‘player1’ is the instanced class and ‘hero’ is an instanced symbol within the class.

This is the error message:  
[COLOR=“Red”]1067: Implicit coercion of a value of type Function to an unrelated type int.[/COLOR]

This function is within a class.

```auto
[COLOR="blue"]public function[/COLOR] get_R():[COLOR="blue"]int[/COLOR]{
	[COLOR="blue"]return[/COLOR] hero.[COLOR="blue"]rotation[/COLOR];
}

```

This code is on my frame in the .fla file.

```auto
[COLOR="Blue"]if[/COLOR](player1.get_R == 0){
	......
}

```

Any help would be really appreciated. Thanks.
