i'm not quite sure but i think this is what you need to do. Add this before the main loop of your code like up near the where you would have stuff like sync. I'm not sure for this one if you need to change the vairables but if you do they are all in matedit. Also i believe there is this code in the matedit source file. I'll check. Anyways here is the code i used for one of my games.
#include "LoadMatrix.dba"
`declare the MatEdit variables
Dim BigMatrix(600,600,1)
Dim StartLoc_X(1): Dim StartLoc_Z(1):Dim Info(2)
Dim TArrayX(1): Dim TArrayZ(1): Dim FKey(10,1)
Dim ColData(100): Dim ZoneData(100): Dim Tiles(500,500)
Dim OverTexture$(100): Dim OverName$(20): Dim ReplaceTex(100)
Dim MOffsetX(25): Dim MOffsetY(25)
Dim MWire(20): Dim MGhost(20): Dim Lock(20)
Dim MatX#(20): Dim MatY#(20): Dim MatZ#(20)
Dim MatWidth#(20): Dim MatHeight#(20)
Dim TilesX(20): Dim TilesZ(20)
Dim MatHi#(20): Dim MatLo#(20)
Read the binary moon tutorial on this site for more information. I think this is all you need sorry if i'm wrong
some mornings, it just doesn't pay to gnaw through those leather straps