|
polygone
|
|
Reply #1 Posted on: March 01, 2011, 10:49:05 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Why is argument_relative not passed as a function parameter from actions?
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
polygone
|
|
Reply #3 Posted on: March 01, 2011, 11:31:00 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Why are the argument_* global variables a different scope to the rest of the global variables? I can't use them inside function definitions...
|
|
« Last Edit: March 01, 2011, 11:34:15 pm by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #7 Posted on: March 02, 2011, 09:40:46 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
If I may bud in, we have plenty of solutions to this issue.
1. Encase everything in {}. { argument_relative = true; action_do_shit(); } 2. Comma. argument_relative = true, action_do_shit(); 3. Parentheses and comma. This will solve if(). if((argument_relative=true, action_if(fuck_you))) ;
You'll find this more accurately mimics GM's behavior. Particularly the last one. (argument_relative = false, do_shit()) is rather form-fitting, syntactically.
IsmAvatar: `int required` is the required parameter. Int was an example. He was implying that the function would be backwards compatible, but would allow LGM to set an argument relative. I object because the additional stack push and assignment is baloney.
|
|
« Last Edit: March 03, 2011, 12:07:53 am by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #9 Posted on: March 03, 2011, 09:23:35 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Indeed. Even if it didn't, we could use && instead of the comma for true, and || instead of it for false, in the case of if().
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
polygone
|
|
Reply #10 Posted on: March 03, 2011, 10:13:46 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
I don't get? Isn't it just better to pass it as an argument anyway? It seems preferable for function calling.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
|
|
|