| Blockland Forums > Modification Help |
| "Should never be considering a brick bigger than us here!" -Solved |
| (1/5) > >> |
| Jardev:
Solution: Increase length of time between brick creation. So far 20ms works fine. So I have a function creating several hundred bricks at one time. Sometimes it works, and sometimes I get this error that pops up and says "octNode::r_insertBrick - should never be considering a brick bigger than us here!" What could possibly cause this? I'm not messing with scales or anything. Current buildString function: --- Code: ---function buildString(%string,%client,%count) { if(!%count) { %count = 1; } echo("buildString called "@%count@" number of times"); %currString = getRecord(%string,0); %brickDB = getField(%currString,0); %bPos = getField(%currString,1); %bX = getWord(%bPos,0); %bY = getWord(%bPos,1); %bZ = getWord(%bPos,2); %colorID = getField(%currString,2); %brick = new fxDTSBrick() { datablock = %brickDB; position = %bX SPC %bY SPC %bZ; rotation = "0 0 1 90"; colorID = %colorID; angleID = 1; client = %client; isPlanted = 1; }; if(%client.brickGroup) { %client.brickGroup.add(%brick); } %brick.setTrusted(1); %brick.plant(); //Remove first record %newString = removeRecord(%string,0); if(getRecordCount(%newString) > 0) { schedule(1,0,"buildString",%newString,%client,%count++); } } --- End code --- Here was the latest (portion of) string of bricks created: --- Code: ---brick4xCubeData TAB -16.8844 83.8705 0.0018 TAB 6 brick4xCubeData TAB -14.8844 83.8705 0.0018 TAB 6 brick4xCubeData TAB -12.8844 83.8705 0.0018 TAB 6 brick4xCubeData TAB -10.8844 83.8705 0.0018 TAB 6 brick4xCubeData TAB -8.8844 83.8705 0.0018 TAB 6 brick4xCubeData TAB -6.8844 83.8705 1.0018 TAB 6 brick4xCubeData TAB -4.8844 83.8705 0.0018 TAB 6 brick4xCubeData TAB -2.8844 83.8705 0.0018 TAB 6 brick4xCubeData TAB -0.884399 83.8705 1.0018 TAB 6 brick4xCubeData TAB 1.1156 83.8705 1.0018 TAB 6 brick4xCubeData TAB 3.1156 83.8705 0.0018 TAB 6 brick4xCubeData TAB 5.1156 83.8705 0.0018 TAB 6 brick4xCubeData TAB 7.1156 83.8705 1.0018 TAB 6 brick4xCubeData TAB 9.1156 83.8705 1.0018 TAB 6 brick4xCubeData TAB 11.1156 83.8705 2.0018 TAB 6 brick4xCubeData TAB 13.1156 83.8705 2.0018 TAB 6 brick4xCubeData TAB 15.1156 83.8705 2.0018 TAB 6 brick4xCubeData TAB 17.1156 83.8705 2.0018 TAB 6 brick4xCubeData TAB 19.1156 83.8705 4.0018 TAB 6 brick4xCubeData TAB 21.1156 83.8705 5.0018 TAB 6 brick4xCubeData TAB 23.1156 83.8705 2.0018 TAB 6 --- End code --- |
| Brian Smithers:
Post the code. |
| Jardev:
So I set up a string with all of the data I need for each brick: (Cut very short to avoid massive string) --- Code: ---brick4xCubeData TAB 291.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 293.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 295.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 297.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 299.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 301.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 303.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 305.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 307.182 157.921 1.00008 TAB 6 brick4xCubeData TAB 309.182 157.921 1.00008 TAB 6 brick4xCubeData TAB 311.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 313.182 157.921 8.24332e-05 TAB 6 brick4xCubeData TAB 315.182 157.921 1.00008 TAB 6 brick4xCubeData TAB 317.182 157.921 1.00008 TAB 6 brick4xCubeData TAB 319.182 157.921 2.00008 TAB 6 brick4xCubeData TAB 321.182 157.921 3.00008 TAB 6 brick4xCubeData TAB 323.182 157.921 2.00008 TAB 6 brick4xCubeData TAB 325.182 157.921 2.00008 TAB 6 brick4xCubeData TAB 327.182 157.921 1.00008 TAB 6 brick4xCubeData TAB 329.182 157.921 2.00008 TAB 6 brick4xCubeData TAB 331.182 157.921 4.00008 TAB 6 brick4xCubeData TAB 333.182 157.921 3.00008 TAB 6 brick4xCubeData TAB 335.182 157.921 3.00008 TAB 6 brick4xCubeData TAB 337.182 157.921 4.00008 TAB 6 brick4xCubeData TAB 339.182 157.921 4.00008 TAB 6 brick4xCubeData TAB 341.182 157.921 3.00008 TAB 6 brick4xCubeData TAB 343.182 157.921 1.00008 TAB 6 brick4xCubeData TAB 345.182 157.921 2.00008 TAB 6 brick4xCubeData TAB 347.182 157.921 4.00008 TAB 6 brick4xCubeData TAB 349.182 157.921 3.00008 TAB 6 brick4xCubeData TAB 351.182 157.921 4.00008 TAB 6 brick4xCubeData TAB 353.182 157.921 5.00008 TAB 6 brick4xCubeData TAB 291.182 159.921 8.24332e-05 TAB 6 brick4xCubeData TAB 293.182 159.921 -0.999918 TAB 6 --- End code --- Then I call the function: --- Code: ---function buildString(%string,%client) { echo("buildString called"); for(%i=0;%i<getRecordCount(%string);%i++) { %currString = getRecord(%string,%i); %brickDB = getField(%currString,0); %bPos = getField(%currString,1); %colorID = getField(%currString,2); %brick = new fxDTSBrick() { datablock = %brickDB; position = %bPos; rotation = "0 0 1 90"; colorID = %colorID; scale = "1 1 1"; angleID = 1; client = %client; isPlanted = 1; }; if(%client.brickGroup) { %client.brickGroup.add(%brick); } %brick.setTrusted(1); %brick.plant(); } } --- End code --- It will work fine the first time I call it, but if I clear the bricks and re-do the process, I get that error. |
| Kalphiter:
8.24332e-05 I really don't think .0000824332 is a valid position. |
| Jardev:
--- Quote from: Kalphiter on February 20, 2012, 10:55:51 PM ---8.24332e-05 I really don't think .0000824332 is a valid position. --- End quote --- Would it not automatically round it to 0 when creating the brick? |
| Navigation |
| Message Index |
| Next page |