Im trying to work on a new Terrain Mesh, but its giving me a error, but I can't figure out whatz wrong.
please look thru let me know..
Im getting "Epression of type 'Int' cannot be indexed" on the vex_array[?,?] can you let me know why..?
Type Terrain Field Mesh:TMesh,Surf:TSurface Field Gridx:Int, Girdy:Int, Scale:Float Field X:Float, Y:Float, Z:Float Field vex_array:TSurface[128,128] 'This sets up the terrain, but Width/Height maxs out at 128 Function Create:Terrain(Width:Int,Height:Int,S:Int) T:Terrain = New Terrain Mesh=CreateMesh() Surf=CreateSurface(Mesh) Scale = S Girdx=Width Girdy=Height For x:Int = 0 To Gridx ; For y:Int = 0 To Girdy vex_array[x,y]=AddVertex(Surf,x,y,x/gridx,y/gridy) Next ; Next For x:Int = 0 To Gridx-1 ; For y:Int = 0 To Gridy AddTriangle(Surf,vex_array[x+1,y],vex_array[x,y],vex_array[x,y+1]) AddTriangle(Surf,vex_array[x+1,y],vex_array[x,y+1],vex_array[x+1,y+1]) Next ; Next End Function End Type
please look thru let me know..
Im getting "Epression of type 'Int' cannot be indexed" on the vex_array[?,?] can you let me know why..?