Collisions not updating?

Blitz3D Forums/Blitz3D Beginners Area/Collisions not updating?

Liimbix(Posted 2015) [#1]
Hi all, I am working on a micro voxel engine with Blitz3D, and when I create the terrain (not sure how to add code so)
Terrain:

Dim vox(10000)
For x=1 To 16
For y=2 To 2
For z=1 To 16
vox(v) = CreateCube()
EntityType vox(v),type_block
ScaleEntity vox(v), 1,1,1
PositionEntity vox(v), x*2,y*2,z*2
If EntityY(vox(v))>=2 Then EntityTexture vox(v),LoadTexture("test.jpg")
If EntityY(vox(v))<=2 Then EntityTexture vox(v),LoadTexture("ground_down.jpg")
EntityPickMode vox(v),2
v=v+1
Next
Next
Next

The terrain DOES have collisions, and works fine, but then when I create a block down in a new function:

place(p)=CreateCube()
EntityType place(p),type_place
EntityRadius place(p),.1
EntityTexture place(p),LoadTexture("test.jpg")
MoveEntity place(p),x2,y2,z2
ScaleEntity place(p),1,1,1
EntityPickMode place(p),2
p=p+1

I had set up a new collision type for the placed blocks, instead of computer generated blocks, and for some reason the collisions don't update and I go right through the blocks I place. I do have UpdateWorld in the right place, and all the collisions are correct, all the types are set up fine, it just doesn't seem to be updating the collisions whenever I place a black. Any help would be much appreciated (:

EDIT: I don't know how to delete a post, but I found the issue. because the second collision was in a function, i had to make my two types (player,block) global! :)