Jump to content

Expression Error


Recommended Posts

Hi there,

i'm playing with expressions a bit and i stumbled over an error in one of my expressions.

"Unable to evaluate expression -(Syntax Error - extra tokens detected in expression)"

I checked the number of arguments in my expression call and the defined expression and they are the same number.

I checked the namings in the expression and i couldn't find an error.

So where exactly do i have to look for that error?

Thx, any help is appreciated.

NatX

edited:

it would really help to find a page that describes all the common error messages

Link to comment
Share on other sites

the 'extra tokens' thingy is usually because you have something in ' ' or " " that shouldn't be...at least that's what happens to me...

can you post the expression? I'll be it's something really simple that you're just not seeing

Link to comment
Share on other sites

Yeah, it must be something very simple:

float doorswing(float radius, float positionX, float positionZ, float thickness, float hengeDoor)
{
    float angleDoor = 0;
    float disHBall = sqrt(pow(positionX,2) + pow(positionZ,2));
    float decVar = sqrt(pow((hengeDoor-positionZ),2) + pow((radius+thickness),2));
    float alpha = asin((radius+thickness)/disHBall);
    float beta = asin(positionX/disHBall);
    if (disHBall <= decVar, angleDoor=(alpha+beta), 0)
    return angleDoor;
}

:ph34r:

My eyes are weiry! -lol

BTW, i know it's not the best naming, but should work anyhow, don't you think so?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...