MESH EXIST This command will return a one if the specified mesh exists, otherwise zero will be returned.
Syntax
    Return Integer=MESH EXIST(Mesh Number)
Parameters
    Mesh Number
Integer The mesh number
Returns
This command will return a one if the specified mesh exists, otherwise zero will be returned
Description
The parameter should be specified using an integer value.
Example Code
    sync on

    sync rate 120

    hide mouse

    cls 0

    ObjectNumber=1

    MeshNumber=1

    LimbNumber=0

    TextureNumber=1

    load mesh "mesh.x",MeshNumber

    load mesh "newmesh.x",MeshNumber+1

    load image "iron.jpg",TextureNumber

    make object ObjectNumber, MeshNumber,TextureNumber

    if mesh exist(MeshNumber)=1 then delete mesh MeshNumber

    make mesh from object MeshNumber, ObjectNumber

    add limb ObjectNumber,LimbNumber+1,MeshNumber

    link limb ObjectNumber,0,LimbNumber+1

    offset limb ObjectNumber,1,1,0,0

    color limb ObjectNumber,LimbNumber+1,rgb(0,255,0)

    scale limb ObjectNumber,LimbNumber+1,50,50,50

    while mouseclick()=0

    set cursor 0,0

    print "press z key"

    if inkey$()="z" then change mesh ObjectNumber, LimbNumber+1, MeshNumber+1

    xrotate object ObjectNumber,wrapvalue(object angle x(ObjectNumber)+1)

    sync

    endwhile

    delete object ObjectNumber

    if mesh exist(MeshNumber)=1 then delete mesh MeshNumber

    if mesh exist(MeshNumber+1)=1 then delete mesh MeshNumber+1

    end
See also
BASIC3D Commands Menu Index