SphereCommunity
problems with <call functionname> - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: problems with <call functionname> (/Thread-problems-with-call-functionname)

Pages: 1 2


problems with <call functionname> - wuffel - 08-28-2013 12:15 AM

Hello!

For a few days i'm working on the upgrade from 055 to the latest 0.56 linux build. I'm not sure if its a bug, or i'm just dumb, but..

"if <call f_languages_intercept <local.text>>" bringing this error up.
Can't resolve <call f_languages_intercept This is a test.>

Also stuff like this:
local.foo=<call f_languages_intercept <local.text>> isn't working anymore.

The functionname doesnt matter, and its only an example. A normal "call functionname" does its job. But when i'm starting to concatenate if-clauses with <call functionname> or variables.. its always a cant-resolve case. Can someone figuring out my mistake?


RE: problems with <call functionname> - darksun84 - 08-28-2013 01:00 AM

Yup looks like it's broken :\


RE: problems with <call functionname> - Mordaunt - 08-28-2013 01:11 AM

Can't say that I have ever used it like that, but

call function_name <local.whatever>

is working


RE: problems with <call functionname> - wuffel - 08-28-2013 01:24 AM

Yepp.
The normal "call functionname" works. But the difference between a
"if <call functionname>"
and
"if <functionname>"
can be huge. Actually i have two choices now:

First:
if <call functionname <args>>
is going to:
call functionname <args>
if <functionname <args>
I have to do many adjustments in this case.

Second:
if <functionname <holy-shit-a-big-amount-of-locals>>


I need the defined locals from the invoking function, and the returns in the invoked function are well placed. ^^


RE: problems with <call functionname> - admin phoenix - 08-28-2013 01:43 AM

why you use call?
you donĀ“t Need it since some dev coded it new.
check the Revision text


RE: problems with <call functionname> - wuffel - 08-28-2013 02:25 AM

since i already checked the revision changelog more than once: can you please copy'n'paste me the part where they made call obsolete?


RE: problems with <call functionname> - Coruja - 08-28-2013 03:47 AM

CALL is not a function, it cant be used inside <>

Code:
LOCAL.X=666
CALL something

[FUNCTION something]
SAY <LOCAL.X>
this already preserves LOCAL.X
but I think it would be better if you copy/paste here this part of the script to ppl understand it better


RE: problems with <call functionname> - darksun84 - 08-28-2013 03:59 AM

By looking at the revision, it was possible :

This can also be used as <CALL Function ...>, faster without arguments, slower with


Now i don't know, maybe it was changed Shock


RE: problems with <call functionname> - wuffel - 09-01-2013 05:39 AM

doesnt matter. posted a bug-report since it should work due to the revision changelog. as long as a function has a "return"-value the assignment of a value - even with a function - should work.

either local.value=<call functionname> nor if <call functionname> works.


RE: problems with <call functionname> - admin phoenix - 09-06-2013 10:00 PM

I am using the function code very often
local.bla=<f_example <src.uid>>

[Function f_example]
local.uid=<args>
RETURN <local.uid>

or if you have more than one argument

[FUNCTION f_example]
RETURN <argv[0]>