Jump to content
----

Errors compiling script with UDF

Recommended Posts

Im using a UDF in my script for this:

$arcsinh = (ASinh($sigrad))

and it works just fine but then i go to compile it there are errors:

Capture.thumb.PNG.dec0a4defbb7b0f3f764bcd5005293f0.PNG

Share this post


Link to post
Share on other sites

I read it but I dont see why its happening and have no clue how to fix it

The variable is there so how could it not be declared or created

Share this post


Link to post
Share on other sites
Posted (edited)

Well, the $ret[] array is not defined in the snippet you have posted,  so what about you define it before use as a local variable?
... and you have an local array $arr defined for which purpose?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Posted (edited)

I tried fixing it but the UDF just kept giving me issues so i just made the function myself\

In case someone in the future needs to make a arcsinh heres how:

Log($x+(Sqrt($x^2+1))/Log(2.71828182845904523536028747135266249775724709369995))

 

Edited by ----

Share this post


Link to post
Share on other sites

As Jos said, you declared $arr you didn't declare $ret your code should look like:

Func ConchoiidCurve($a, $theta)
    Local $ret[2]
    Local $r = sec($theta)+$a*Cos($theta)
    $ret[0] = Cos($theta)*$r
    $ret[1] = Sin($theta)*$r
    Return $ret
EndFunc

Func SemicubicalParabolaCurve($a, $t)
    Local $ret[2]
    $ret[0] = $t^2
    $ret[1] = $a*$t^3
    Return $ret
EndFunc

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...