THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/08/2009 at 08:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :
---------
Here's the code I am using.
I am trying to get the MDATA_SUBDIVIDE_SUB to pull the number that is entered in to the NUM_SUBDIVISIONS text box to set the number of subdivisions.
I keep getting this error.
subdivisiontool.cpp(80) : error C2664: 'String::StringToLong' : cannot convert parameter 1 from 'String' to 'LONG *'
Anyone have any thoughts?
Thanks,
~Shawn
> `
\>
\> LONG amount;
\> String subAmount;
\> subAmount = mdat.bc->GetString(NUM_SUBDIVISIONS);
\> amount = String::StringToLong (subAmount);
\>
\> //Determine Attributes
\>
\> if (mdat.bc->GetBool(HYPERNURBS_SUBDIVISION, TRUE)) //If HyperNURBS is checked
\> {
\> mdat.bc->SetBool(MDATA_SUBDIVIDE_HYPER, TRUE);
\> }
\> else
\> {
\> mdat.bc->SetBool(MDATA_SUBDIVIDE_HYPER, FALSE);
\> }
\> mdat.bc->SetLong(MDATA_SUBDIVIDE_SUB, subAmount);
\> mdat.bc->SetReal(MDATA_SUBDIVIDE_ANGLE, pi);
\>
\> //Subdivision Command
\> SendModelingCommand(MCOMMAND_SUBDIVIDE, mdat);
\>
\> return true;
\>
\>
`