vicho815 Posted January 10, 2008 Author Share Posted January 10, 2008 it highlights this:Sub ScriptSetTile(ByVal mapper As Long, ByVal x As Long, ByVal y As Long, ByVal setx As Long, ByVal sety As Long, ByVal tileset As Long, ByVal layer As Long)Dim Packet As StringPacket = "tilecheck" & SEP_CHAR & mapper & SEP_CHAR & CStr(x) & SEP_CHAR & CStr(y) & SEP_CHAR & CStr(layer) & SEP_CHAR Select Case layer Case 0 map(mapper).tile(x, y).Ground = sety * 14 + setx map(mapper).tile(x, y).GroundSet = tileset Packet = Packet & map(mapper).tile(x, y).Ground & SEP_CHAR & map(mapper).tile(x, y).GroundSet Case 1 map(mapper).tile(x, y).Mask = sety * 14 + setx map(mapper).tile(x, y).MaskSet = tileset Packet = Packet & map(mapper).tile(x, y).Mask & SEP_CHAR & map(mapper).tile(x, y).MaskSet Case 2 map(mapper).tile(x, y).Anim = sety * 14 + setx map(mapper).tile(x, y).AnimSet = tileset Packet = Packet & map(mapper).tile(x, y).Anim & SEP_CHAR & map(mapper).tile(x, y).AnimSet Case 3 map(mapper).tile(x, y).Mask2 = sety * 14 + setx map(mapper).tile(x, y).Mask2Set = tileset Packet = Packet & map(mapper).tile(x, y).Mask2 & SEP_CHAR & map(mapper).tile(x, y).Mask2Set Case 4 map(mapper).tile(x, y).M2Anim = sety * 14 + setx map(mapper).tile(x, y).M2AnimSet = tileset Packet = Packet & map(mapper).tile(x, y).M2Anim & SEP_CHAR & map(mapper).tile(x, y).M2AnimSet Case 5 map(mapper).tile(x, y).Fringe = sety * 14 + setx map(mapper).tile(x, y).FringeSet = tileset Packet = Packet & map(mapper).tile(x, y).Fringe & SEP_CHAR & map(mapper).tile(x, y).FringeSet Case 6 map(mapper).tile(x, y).FAnim = sety * 14 + setx map(mapper).tile(x, y).FAnimSet = tileset Packet = Packet & map(mapper).tile(x, y).FAnim & SEP_CHAR & map(mapper).tile(x, y).FAnimSet Case 7 map(mapper).tile(x, y).Fringe2 = sety * 14 + setx map(mapper).tile(x, y).Fringe2Set = tileset Packet = Packet & map(mapper).tile(x, y).Fringe2 & SEP_CHAR & map(mapper).tile(x, y).Fringe2Set Case 8 map(mapper).tile(x, y).F2Anim = sety * 14 + setx map(mapper).tile(x, y).F2AnimSet = tileset Packet = Packet & map(mapper).tile(x, y).F2Anim & SEP_CHAR & map(mapper).tile(x, y).F2AnimSet End SelectCall SaveMap(mapper)Call SendDataToAll(Packet & END_CHAR)End SubAnd I get rte 9: sub-script is out of rangeIt depends on what layer do u choose in SetTile command Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now