It says "Object Number Illegal at line 468. Runtime Error 7006"
Here is my line 468:
Offset limb Obj,LimbNum,Val(D$(0))+(k-1)*6-Letters*3+3,Val(D$(1)),0
After I saw this, I tried adding more code to see if it worked:
Make_Object_3DText:
`Text3D$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890`~!@#$%^&*()-_=+[]{}\|;:',.<>/?" `All of the text that can be used
Letters = len(Text3D$) `Gets the amount of letters in the text
LimbNum = 1 `Text object limb number
Make Object cube TObj,1 : Make Mesh From Object TObj,2 `mesh used for creating all of the text
Make Object Triangle Obj,0,0,0,0,0,0,0,0,0 `Object used as a center axis for the text
for k = 1 to Letters `Loop for drawing the 3D text
Letter$ = mid$(Text3D$,k) `Gets each letter in the text
Rem The data used for drawing all of the text (XPosition,YPosition,XSize,YSize,ZAngle,Space creates the limb)
if Letter$="A" or Letter$="a" then Text3DData$="-1.5,0,1,5,0 0,2,2,1,0 0,0,2,1,0 1.5,0,1,5,0 "
if Letter$="B" or Letter$="b" then Text3DData$="-1.5,0,1,5,0 0,2,2,1,0 0,0,2,1,0 0,-2,2,1,0 1.5,0,1,3,0 1.25,1.75,.75,1.4142,45 1.25,-1.75,.75,1.4142,135 "
if Letter$="C" or Letter$="c" then Text3DData$="-2,0,1,5,0 0,2,3,1,0 0,-2,3,1,0 "
if Letter$="D" or Letter$="d" then Text3DData$="-1.5,0,1,5,0 0,2,2,1,0 0,-2,2,1,0 1.5,0,1,3,0 1.25,1.75,.75,1.4142,45 1.25,-1.75,.75,1.4142,135 "
if Letter$="E" or Letter$="e" then Text3DData$="-1,0,1,5,0 .5,2,2,1,0 .5,0,2,1,0 .5,-2,2,1,0 "
if Letter$="F" or Letter$="f" then Text3DData$="-1,0,1,5,0 .5,2,2,1,0 .5,0,2,1,0 "
if Letter$="G" or Letter$="g" then Text3DData$="-2,0,1,5,0 .5,2,4,1,0 1.5,0,2,1,0 .5,-2,4,1,0 2,-1,1,1,0 "
if Letter$="H" or Letter$="h" then Text3DData$="-1.5,0,1,5,0 0,0,2,1,0 1.5,0,1,5,0 "
if Letter$="I" or Letter$="i" then Text3DData$="0,0,1,3,0 0,2,3,1,0 0,-2,3,1,0 "
if Letter$="J" or Letter$="j" then Text3DData$="1,0,1,5,0 -1,-1,1,1,0 -.5,-2,2,1,0 "
if Letter$="K" or Letter$="k" then Text3DData$="-1,0,1,5,0 1.1464,-2.1464,0.7072,0.7072,0 1.1464,2.1464,.7072,.7072,0 .086,1.086,3,1,45 .086,-1.086,1,3,45 "
if Letter$="L" or Letter$="l" then Text3DData$="-1,0,1,5,0 0.5,-2,2,1,0 "
if Letter$="M" or Letter$="m" then Text3DData$="-2,0,1,5,0 2,0,1,5,0 0,2,3,1,0 0,0,1,3,0 "
if Letter$="N" or Letter$="n" then Text3DData$="-1.5,0,1,5,0 1.5,0,1,5,0 0,0,5.2915,1,-57.5 "
if Letter$="O" or Letter$="o" then Text3DData$="-2,0,1,2,0 2,0,1,2,0 0,-2,2,1,0 0,2,2,1,0 -1.4,1.4,2.12,1,45 1.4,-1.4,2.12,1,45 1.4,1.4,1,2.12,45 -1.4,-1.4,1,2.12,45 "
if Letter$="P" or Letter$="p" then Text3DData$="-1,0,1,5,0 .5,2,2,1,0 .5,0,2,1,0 1,1,1,1,0 "
if Letter$="Q" or Letter$="q" then Text3DData$="1.4,-1.4,1,2.5,45 -2,0,1,2,0 2,0,1,2,0 0,-2,2,1,0 0,2,2,1,0 -1.4,1.4,2.12,1,45 1.4,-1.4,2.12,1,45 1.4,1.4,1,2.12,45 -1.4,-1.4,1,2.12,45 "
if Letter$="R" or Letter$="r" then Text3DData$="-1,0,1,5,0 .5,2,2,1,0 .5,0,2,1,0 1,1,1,1,0 .3,-1.3,1,2.394,45 1.1464,-2.1464,.7072,.7072,0 "
if Letter$="S" or Letter$="s" then Text3DData$="0,2,3,1,0 -1,1,1,1,0 0,0,3,1,0 1,-1,1,1,0 0,-2,3,1,0 "
if Letter$="T" or Letter$="t" then Text3DData$="0,2,3,1,0 0,-.5,1,4,0 "
if Letter$="U" or Letter$="u" then Text3DData$="-1.2,0,1,5,0 1.2,0,1,5,0 0,-2,2,1,0 "
if Letter$="V" or Letter$="v" then Text3DData$="0,-2,1.25,1,0 -1,0,4.95,1,-70 1,0,4.95,1,70 "
if Letter$="W" or Letter$="w" then Text3DData$="0,0,.6,1,0 -.9,-1,3.07,1,50 .9,-1,3.07,1,-50 -2,0,1,5,0 2,0,1,5,0 "
if Letter$="X" or Letter$="x" then Text3DData$="-2.146,2.146,.707,0.707,0 2.146,2.146,0.707,0.707,0 -2.146,-2.146,0.707,0.707,0 2.146,-2.146,0.707,0.707,0 0,0,6.07,1,45 0,0,1,6.07,45 "
if Letter$="Y" or Letter$="y" then Text3DData$="0,-1,1,3,0 1.085,1.085,3,1,45 2.146,2.146,.707,0.707,0 -1.085,1.085,1,3,45 -2.146,2.146,.707,0.707,0 "
if Letter$="Z" or Letter$="z" then Text3DData$="0,2,3.5,1,0 0,-2,3.5,1,0 0,0,4.5,1,53 "
if Letter$="0" then Text3DData$="0,2,3,1,0 0,-2,3,1,0 1,0,1,3,0 -1,0,1,3,0 "
if Letter$="1" then Text3DData$="0,0,1,5,0 "
if Letter$="2" then Text3DData$="0,2,3,1,0 1,1,1,1,0 0,0,3,1,0 -1,-1,1,1,0 0,-2,3,1,0 "
if Letter$="3" then Text3DData$="1,0,1,5,0 -.5,2,2,1,0 -.5,0,2,1,0 -.5,-2,2,1,0 "
if Letter$="4" then Text3DData$="0,0,3,1,0 1,1.5,1,2,0 -1,1.5,1,2,0 1,-1.5,1,2,0 "
if Letter$="5" then Text3DData$="0,2,3,1,0 -1,1,1,1,0 0,0,3,1,0 1,-1,1,1,0 0,-2,3,1,0 "
if Letter$="6" then Text3DData$="0,2,3,1,0 -1,0,1,3,0 0,0,3,1,0 1,-1,1,1,0 0,-2,3,1,0 "
if Letter$="7" then Text3DData$="0,2,3,1,0 1,0,1,5,0 "
if Letter$="8" then Text3DData$="-1,0,1,5,0 1,0,1,5,0 0,2,1,1,0 0,0,1,1,0 0,-2,1,1,0 "
if Letter$="9" then Text3DData$="-1,1,1,3,0 0,2,1,1,0 0,0,1,1,0 1,0,1,5,0 "
if Letter$="-" then Text3DData$="0,0,4,1,0 "
if Letter$="+" then Text3DData$="0,0,4,1,0 0,0,1,4,0 "
if Letter$="*" then Text3DData$="0,0,4,1,45 0,0,1,4,45 "
if Letter$="/" then Text3DData$="0,0,5,1,45 "
if Letter$="!" then Text3DData$="0,-2,.8,.8,0 0,-2,.8,.8,22.5 0,-2,.8,.8,45 0,-2,.8,.8,68 0,.8,1,3.4,0 "
if Letter$="@" then Text3DData$="1,.7,3,1,0 1,-.7,3,1,0 -.8,0,1,2.4,0 2,1,1,3,0 0,2,5,1,0 -2,0,1,5,0 0,-2,5,1,0 "
if Letter$="#" then Text3DData$="-1,0,1,5,0 1,0,1,5,0 0,1,5,1,0 0,-1,5,1,0 "
if Letter$="$" then Text3DData$="0,2,3,1,0 -1,1,1,1,0 0,0,3,1,0 1,-1,1,1,0 0,-2,3,1,0 0,0,.5,6,0 "
if Letter$="%" then Text3DData$="0,0,5,1,45 1.5,-1.5,1,1,0 1.5,-1.5,1,1,45 -1.5,1.5,1,1,0 -1.5,1.5,1,1,45 "
if Letter$="^" then Text3DData$="-.71,1,3,1,45 .71,1,1,3,45 "
if Letter$="&" then Text3DData$=".3,-.3,1,5,45 .6,-1.4,3,1,45 -.7,-1.5,1,2,45 0,0,4,1,45 0,1.5,3.2,1,0 "
if Letter$="(" then Text3DData$="0,0,1,1.82,0 .287,1.5,1,1.7,-22.5 .287,-1.5,1,1.7,22.5 "
if Letter$=")" then Text3DData$="0,0,1,1.82,0 -.287,1.5,1,1.7,22.5 -.287,-1.5,1,1.7,-22.5 "
if Letter$="_" then Text3DData$="0,-2.3,6,.5,0 "
if Letter$="=" then Text3DData$="0,1,4,1,0 0,-1,4,1,0 "
if Letter$="\" then Text3DData$="0,0,1,5,45 "
if Letter$="|" then Text3DData$="0,0,.5,5,0 "
if Letter$="[" then Text3DData$="0,0,.5,5,0 .5,2.25,1,.5,0 .5,-2.25,1,.5,0 "
if Letter$="]" then Text3DData$="0,0,.5,5,0 -.5,2.25,1,.5,0 -.5,-2.25,1,.5,0 "
if Letter$="{" then Text3DData$="0,0,.5,5,0 .5,2.25,1,.5,0 .5,-2.25,1,.5,0 -.5,0,.5,.5,0 "
if Letter$="}" then Text3DData$="0,0,.5,5,0 -.5,2.25,1,.5,0 -.5,-2.25,1,.5,0 .5,0,.5,.5,0 "
if Letter$=":" then Text3DData$="0,1,1,1,0 0,-1,1,1,0 "
if Letter$=";" then Text3DData$="0,1,1,1,0 0,-1,1,1,0 -.141,-1.8,1,1,-20 "
if Letter$="," then Text3DData$="0,-1,1,1,0 -.141,-1.8,1,1,-20 "
if Letter$="." then Text3DData$="0,-2,1,1,0 "
if Letter$="'" then Text3DData$="0,1.5,1,2,0 "
if Letter$="<" then Text3DData$="-2,0,1,1.25,0 0,1,1,4.95,-70 0,-1,1,4.95,70 "
if Letter$=">" then Text3DData$="2,0,1,1.25,0 0,-1,1,4.95,-70 0,1,1,4.95,70 "
if Letter$="?" then Text3DData$="0,-2,1,1,0 -1,1,1,1,0 1,1,1,1,0 0,2,1,1,0 -.65,1.65,1.414,1,45 .5,.2,1.83,1,45 .65,1.65,1,1.414,45 0,-.6,1,1,0 "
if Letter$="`" then Text3DData$="0,2,.5,1,60 "
if Letter$="~" then Text3DData$="-1,0,.5,1.44,-60 0,0,.5,1.44,60 1,0,.5,1.44,-60 "
if Letter$=" " then goto SkipLetter
TextDataSize = len(Text3DData$) `The amount of text used in the data for a specific letter
Num = 0 `variable for reading the data for the 3D text
Add Limb Obj,LimbNum,TObj `Creates the first object limb for a letter
for i = 1 to TextDataSize `Loop for drawing a 3D letter/number/etc.
if mid$(Text3DData$,i)="," then inc Num,1 `reads a comma in the data
Rem Reads a space in the data
Rem Positions the limbs, scales the limbs, and rotates the limbs based on what is in the text data (Draws the text)
if mid$(Text3DData$,i)=" "
Offset limb Obj,LimbNum,Val(D$(0))+(k-1)*6-Letters*3+3,Val(D$(1)),0
scale limb Obj,LimbNum,Val(D$(2))*100,Val(D$(3))*100,100 : rotate limb Obj,LimbNum,0,0,Val(D$(4))
if i <> TextDataSize `Creates the next limb if it is not the last limb
inc LimbNum,1 : Add Limb Obj,LimbNum,2
endif
Num = 0 : for j = 0 to 4 : D$(j) = "" : next j `Clears all of the data for the next limb
endif
Rem if the text data is not a space and is not a comma then read the number data
if mid$(Text3DData$,i)<>" " and mid$(Text3DData$,i)<>"," then D$(Num)=D$(Num)+mid$(Text3DData$,i)
next i
inc LimbNum,1
SkipLetter: `Skips a letter if there is a space in the text
next k
Delete Object TObj `deletes the temporary object mesh used to create the text
return `returns the the program
I tried running it with the game and I have a new error that says:
Perimeter for 'Val' does no match 'string' at line 555.
This is my line 555
Offset limb Obj,LimbNum,Val(D$(0))+(k-1)*6-Letters*3+3,Val(D$(1)),0