Crashing with Coffee



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/04/2004 at 10:18, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.100 
    Platform:      
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    I'm trying to alter a polygon objects points positions. unfortunatly what i want to do causes crashes I can't explain. the following code, ist very similar to what I've tried and it works.
     
    main ( the_Document, the_Object )
    {
    println("active");

    var p=the_Object->GetPoint(0);

    //if first points x-value is not -1
    //run coffee program
    if(p.x!=-1)
    {

    var angle=cos(3.141592654*46.055/180);
    var array=the_Object->GetPoints();
    var count = sizeof(array);

    var i;
    for (i = 1; i < count; i++)
    {
    //print(tostring(z)+" / " + tostring(angle) +"\n");
    array _.x=array _.z*angle;

    //array _.y=array _.z*angle;

    }

    the_Object->SetPoints(array);

    //ensure that the first points x-value ist -1
    p.x=-1;
    the_Object->SetPoint(0,p);
    }
    }____
    ________ 
    I get the list of points, change the x value and reset the list. perfekt. in the for-loop I've excluded a little code where i change the y value. if i enable it, i get a crash usually right away, sometimes i see the result and then it crashes. if I simply set the value of array[i].y to 0 , no problem. but as soon as i integrate the z value, kaboooom. Cinema crashes completely. if i do this : array[i].y = array[i].y+50; it works as well.
    ____really weird. and i just can't find a solution.




  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/04/2004 at 12:16, xxxxxxxx wrote:

    array _.x=array _.z*angle;

    //array _.y=array _.z*angle;


    the idices got lost... i copied it out of a different forum, where i was hoping for help. and it didn't display [i] there.
    so this is in my code
    array _[ i ].x=array[ i ].z*angle;

    //array[ i ].y=array[ i ].z*angle;_



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/04/2004 at 18:12, xxxxxxxx wrote:

    As noted in another thread, please enclose code within code tags. Also, you might want to upgrade to 8.207 (or 8.503) and test the code there  (8.100 is unsupported). I don't see anything immediately wrong with your code.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/04/2004 at 02:11, xxxxxxxx wrote:

    thanks for the reply. i actually managed to get it work without changing anything, but using version 7. with version 8.5 it crashed.


Log in to reply