art3mis Posted July 19, 2016 Share Posted July 19, 2016 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? Quote Link to comment Share on other sites More sharing options...
haggi Posted July 19, 2016 Share Posted July 19, 2016 int variableName = addprim(0, "poly"); Quote Link to comment Share on other sites More sharing options...
art3mis Posted July 20, 2016 Author Share Posted July 20, 2016 (edited) Thanks. So as a novice I'm discovering you can't simply cut and paste from the official documentation http://www.sidefx.com/docs/houdini15.5/vex/functions/addprim Ad that error messages in Houdini can be confusing Edited July 20, 2016 by eco_bach Quote Link to comment Share on other sites More sharing options...
haggi Posted July 20, 2016 Share Posted July 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.