My version of DarkBasic Pro is 1.055.
Using spheres, meshes and limbs, I have written a program that produces 20 cannonballs in the shape of a pyramid.
But, when I call the function to create an .x file, the program creates the following "crash" file:-
[COMMON]
PathToEXE=C:\Users\Geoff\Documents\My Dark Progs\Three D\Cannon Balls - Copy\CrashOn_05_30_13.txt
[CEXE]
m_dwRuntimeErrorDWORD=0
m_dwRuntimeErrorLineDWORD=12
By trial and error, I have discovered that if I limit the number of balls to 10, an .x file IS created. But any more than that creates the "crash" file.
I attach my code below:-
Setup()
Create()
CreateXfile()
Wait Key
End
Function Create()
Load Image "bronze.jpg",9
Make Object Sphere 1,1,30,30
Make Object Sphere 2,1,30,30
Make Object Sphere 3,1,30,30
Make Object Sphere 4,1,30,30
Make Object Sphere 5,1,30,30
Make Object Sphere 6,1,30,30
Make Object Sphere 7,1,30,30
Make Object Sphere 8,1,30,30
Make Object Sphere 9,1,30,30
Make Object Sphere 10,1,30,30
remstart
Make Object Sphere 11,1,30,30
Make Object Sphere 12,1,30,30
Make Object Sphere 13,1,30,30
Make Object Sphere 14,1,30,30
Make Object Sphere 15,1,30,30
Make Object Sphere 16,1,30,30
Make Object Sphere 17,1,30,30
Make Object Sphere 18,1,30,30
Make Object Sphere 19,1,30,30
Make Object Sphere 20,1,30,30
remend
Make Mesh From Object 1,1
Make Mesh From Object 2,2
Make Mesh From Object 3,3
Make Mesh From Object 4,4
Make Mesh From Object 5,5
Make Mesh From Object 6,6
Make Mesh From Object 7,7
Make Mesh From Object 8,8
Make Mesh From Object 9,9
Make Mesh From Object 10,10
remstart
Make Mesh From Object 11,11
Make Mesh From Object 12,12
Make Mesh From Object 13,13
Make Mesh From Object 14,14
Make Mesh From Object 15,15
Make Mesh From Object 16,16
Make Mesh From Object 17,17
Make Mesh From Object 18,18
Make Mesh From Object 19,19
Make Mesh From Object 20,20
remend
Delete Object 2
Delete Object 3
Delete Object 4
Delete Object 5
Delete Object 6
Delete Object 7
Delete Object 8
Delete Object 9
Delete Object 10
remstart
Delete Object 11
Delete Object 12
Delete Object 13
Delete Object 14
Delete Object 15
Delete Object 16
Delete Object 17
Delete Object 18
Delete Object 19
Delete Object 20
remend
Add Limb 1,1,1
Add Limb 1,2,2
Add Limb 1,3,3
Add Limb 1,4,4
Add Limb 1,5,5
Add Limb 1,6,6
Add Limb 1,7,7
Add Limb 1,8,8
Add Limb 1,9,9
Add Limb 1,10,10
remstart
Add Limb 1,11,11
Add Limb 1,12,12
Add Limb 1,13,13
Add Limb 1,14,14
Add Limb 1,15,15
Add Limb 1,16,16
Add Limb 1,17,17
Add Limb 1,18,18
Add Limb 1,19,19
Add Limb 1,20,20
remend
Offset Limb 1,2, 0, 1.74, 2.48
Offset Limb 1,3, -0.5, 0.865, 2.48
Offset Limb 1,4, 0.5, 0.865, 2.48
Offset Limb 1,5, -1, 0, 2.48
Offset Limb 1,6, 0, 0, 2.48
Offset Limb 1,7, 1, 0, 2.48
Offset Limb 1,8, -1.5, -0.865, 2.48
Offset Limb 1,9, -0.5, -0.865, 2.48
Offset Limb 1,10, 0.5, -0.865, 2.48
remstart
Offset Limb 1,11, 1.5, -0.865, 2.48
Offset Limb 1,12, 0, 1.116, 1.65
Offset Limb 1,13, -0.5, 0.28, 1.65
Offset Limb 1,14, 0.5, 0.28, 1.65
Offset Limb 1,15, -1, -0.58, 1.65
Offset Limb 1,16, 0, -0.58, 1.65
Offset Limb 1,17, 1, -0.58, 1.65
Offset Limb 1,18, 0, 0.58, 0.825
Offset Limb 1,19, -0.5, -0.28, 0.825
Offset Limb 1,20, 0.5, -0.28, 0.825
remend
Texture Object 1,9
EndFunction
Function CreateXfile()
Make Mesh From Object 1,1
Save Mesh "CannonBalls.x",1
EndFunction
Function Setup()
Set Text Size 27
Color Backdrop RGB(0,0,0)
AutoCam Off
Position Camera 0,0,-10
Point Camera 0,0,0
EndFunction
Can anyone suggest how I can get the program to create an .x file for the total number of 20 cannonballs?
Regards, Geoff.