Jump to content

Syntax error, unexpected integer constant, expecting ")"


art3mis

Recommended Posts

 

Trying to follow a basic VEX tutorial and in the following line the '0' is highlighted

int addprim(0,"poly");

 

and I get the following error

Syntax error, unexpected integer constant, expecting ")"

I'm on a Mac running 15.5 Apprentice.

AFAIK, my code is correct. Anyone?

Link to comment
Share on other sites

The description in the docs do not show an example but the function prototype. That means it shows which arguments the function expects and what type it it returns. The error message is confusing just because Houdini tries to interpret what you are writing. So it sees something like this:

int someName(...)

With something like that you normally start the definition of a vex function and vex functions do not allow a constant int as argument (what would be useless anyway). And so the function definition is not correct what leads to this error message.

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...