Forums > Javascript

Problem with @patching_rect attribute when creating object at random position

January 7, 2009 | 12:43 pm


January 7, 2009 | 3:03 pm

On 7 janv. 09, at 13:43, Roald Baudoux wrote:

> Althought this script seems to function as expected, I get a
> "@patching_rect: bad number" error message any time I create a new
> object.

newdefault() is the way to go (newobject use the old Max 4 syntax
based on the old file format and I would not recommend using it
anymore):

mesObjets[objectNumber] = p.newdefault(aleaPos[0], aleaPos[1],
"toggle", "@patching_rect", aleaPos[0], aleaPos[1], objectSize[0],
objectSize[1], "@bordercolor", aleaColor);

Best,
ej


January 7, 2009 | 5:40 pm


Viewing 3 posts - 1 through 3 (of 3 total)