Passing a variable into a function

Hi, I'm not sure why, but while building a simple RSS feed widget (can be found under plugins section), I am not able to pass a variable that I collect from the settings of the widget.

In my edit.php file I have a dropdown that the user can select the amount of articles to show.

In the content php, no matter what I do I can't get that value into the function that then displays the rss feed. I know the variable is collected because I can echo it. But inside a Function it seems to not be recognized at all.

I'm sure I'm missing something about Elgg, but I don't know what.

Any help appreciated.

Thanks!