# Asfuntion PROBLEM! BUG?

**URL:** <https://forum.kirupa.com/t/asfuntion-problem-bug/45177>\
**Category:** Uncategorized\
**Created:** [March 11, 2004, 6:41pm UTC](https://forum.kirupa.com/t/asfuntion-problem-bug/45177 "2004-03-11T18:41:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harpreet](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@Harpreet](https://forum.kirupa.com/u/Harpreet)\
**Post date:** [March 11, 2004, 6:41pm UTC](https://forum.kirupa.com/t/asfuntion-problem-bug/45177/1 "2004-03-11T18:41:32Z")

</div>

I am using the asfunction to call a function and passing a parameter. The problem is in the parameter. I can give a parameter that is over 104 characters. What ever is after that 104th character doesnt pass into the string of the function.

Any ideas why is this so and any solutions?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 7:01pm UTC](https://forum.kirupa.com/t/asfuntion-problem-bug/45177/2 "2004-03-11T19:01:07Z")

</div>

I dont know of any limitations, maybe you need to URL encode the parameter.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 7:11pm UTC](https://forum.kirupa.com/t/asfuntion-problem-bug/45177/3 "2004-03-11T19:11:05Z")

</div>

What do you mean URL encode the parameter?

Also I am trying it to do in a different way if that doesnt work but am stuck again and maybe you can help me in this, since i know there is a way.

I am passing a string in the argument and that string is the name of the parameter that is stored in a text file.  
Therefore i am using the loadVar method.  
eg Text File content  
&realName=something  
&fakeName=somethingelse

function call  
’asfunction: myFunction, something’

function myFunction(paraName){  
//…after loading the textfile and everything

var x=this.paraName doesnt work.  
var c=this.realName is working  
}  
any suggestions?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 7:19pm UTC](https://forum.kirupa.com/t/asfuntion-problem-bug/45177/4 "2004-03-11T19:19:27Z")

</div>

Take a look at this thread to see how i parsed the arguments from the textfile.  
[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=42654&](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=42654&)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 7:27pm UTC](https://forum.kirupa.com/t/asfuntion-problem-bug/45177/5 "2004-03-11T19:27:43Z")

</div>

The problem here is that I dont know that which variable will be called untill the user tells me to. The tread will work if you have a variable in the text file myVar and are using this.myVar. But for me since i dont know that variable name unless and untill it is called I cant use this.myVar.

Also I dont have any idea what variable names exist in the textfile since they are added by the user, that removes possibity of if…then scenario
