# Stuck on a tutorial

**URL:** <https://forum.kirupa.com/t/stuck-on-a-tutorial/218499>\
**Category:** Uncategorized\
**Created:** [March 8, 2007, 7:38am UTC](https://forum.kirupa.com/t/stuck-on-a-tutorial/218499 "2007-03-08T07:38:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![countspatula](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@countspatula](https://forum.kirupa.com/u/countspatula)\
**Post date:** [March 8, 2007, 7:38am UTC](https://forum.kirupa.com/t/stuck-on-a-tutorial/218499/1 "2007-03-08T07:38:50Z")

</div>

i started doing sifertims rpg making tutorial and im onto the bit were you make the tiles.  
ive done it 3 times and all it does is when i dont put the item map it doesnt show the guy and if i put the item map it only shows the guy.

money = 0;

mvWdth = 576;  
mvHght = 576;  
tileWdth = 64;  
tileHght = 64;

tile0 = function () {};  
tile0.prototype.pos = 1;  
tile0.prototype.barrier = false;

tile1 = function () {};  
tile1.prototype.pos = 2;  
tile1.prototype.barrier = true;

tile2 = function () {};  
tile2.prototype.pos = 3;  
tile2.prototype.barrier = true;

map1 = [[2,2,2,2,2,2,2,2,2],  
[2,2,2,0,0,0,0,0,2],  
[2,2,1,0,0,0,0,0,2],  
[2,1,1,1,0,0,0,0,1],  
[1,1,1,1,0,0,0,0,1],  
[1,1,1,1,0,0,0,0,2],  
[1,1,1,0,0,0,1,1,2],  
[1,1,0,0,0,0,0,1,2],  
[1,1,1,1,2,2,2,2,2]];

function MapMaker (map) {

\_root.attachMovie(“blank”, “tiler”, d++);  
var mapWdth = map[0].length;  
var mapHght = map.length;  
for (var i = 0; i \< mapHght; i++) {

for (var j = 0; j \< mapWdth; j++) {  
var name = “tile\_”+j+"\_"+i;  
\_root[name] = new \_root[“tile”+map\*[j]];  
\_root.tiler.attachMovie(“TileSet1”, name, i_100+j_2);

\_root.tiler[name].\_x = (j\*\_root.tileWdth);  
\_root.tiler[name].\_y = (i\*\_root.tileHght);  
\_root.tiler[name].gotoAndStop(\_root[name].pos);

}  
}

}

MapMaker(map1);

itemMap1 = [[0,0,0,0,0,0,0,0,0],  
[0,0,0,0,0,0,0,0,0],  
[0,0,0,0,0,0,0,0,0],  
[0,0,0,0,0,1,0,0,0],  
[0,0,0,0,0,0,0,0,0],  
[0,0,0,0,0,0,0,0,0],  
[0,0,0,0,0,0,0,0,0],  
[0,0,0,0,0,0,0,0,0],  
[0,0,0,0,0,0,0,0,0]]

function placeItems (map) {

\_root.attachMovie(“blank”, “items”, this.getNextHighestDepth());  
var mapWdth = map[0].length;  
var mapHght = map.length;  
for (var i = 0; i \< mapHght; i++) {

for (var j = 0; j \< mapWdth; j++) {

switch (map\*[j]){

case 1 :  
\_root.items.attachMovie(“Guy”,“guy\_mc”, d++);  
\_root.items.guy\_mc.\_x = (\_root.tileWdth \* j);  
\_root.items.guy\_mc.\_y = (\_root.tileHght \* i);

}

}

}

}  
placeItems(itemMap1);

thats the code and i cant see were im going wrong :S please help me.
