ID:668765
 
Keywords: error, runtime
(See the best response by DarkCampainger.)
So when ever i host my game i get this lil guy does anyone have any clue what it is and how to fix it ive tried everything but i cant even isolate it . Please help me out

runtime error: list index out of bounds
proc name: New (/obj/mapinfo/New)
source file: map_grid.dm,18
usr: null
src: Map z33 (10, 2) (/obj/mapinfo)
call stack:
Map z33 (10, 2) (/obj/mapinfo): New(the water (1,100,33) (/turf/water))
Map z33 (10, 2) (/obj/mapinfo): New(the water (1,100,33) (/turf/water)



Go to line 18 of map_grid.dm to find the line causing the error--as the runtime mentioned. You're likely accessing a list by an index that is beyond its length. If you can't figure it out, post the /obj/mapinfo/New() process here (surround it with <dm> and </dm> tags) and we'll help you fix it.
uhhh
var
map_coords[9][10]

obj
mapinfo
density=0
var
oX=1
oY=1
village_control = "Missing"
can_capture = 1
base_capture = 1

New()
. = ..()
tag = "__mapinfo__[z]"
name = "Map z[z] ([oX], [oY])"
map_coords[oX][oY+1] = src

proc
CanLeave(mob/human/M)
return 1
CanEnter(mob/human/M)
return 1
PlayerEntered(mob/human/M)
PlayerLeft(mob/human/M)

testbeacon
testbeacon2

// Tag object for map locations
// Rather than setting the 'tag' variable on a turf,
// using an obj like this allows you to see tagged areas
// on the map more easily.
maptag
icon = 'icons/maptag_marker.dmi'
layer = 100

// Maptags are objs (So they show on the map)
parent_type = /obj

// Make maptags completely invisible.
// Since their sole purpose is to mark a location,
// players don't need to ever interact with them.
invisibility = 101

proc
// Find the turf a maptag is on
locate_tag(tag as text)
// Find the maptag object
var/maptag/tag_obj = locate(tag)

// If the tag isn't there, something is obviously wrong
// So crash the proc to get debug info
if(!tag_obj)
CRASH("Maptag not found: \"[tag]\"")

// Return the turf the maptag object is on
return tag_obj.loc

atom
var
gx=9000
gy=9000
proc
Global_Coords()
Get_Global_Coords()
if(gx && gy)
var/XY[2]
XY[1]=gx
XY[2]=gy
return XY
Get_Global_Coords()
var/obj/mapinfo/Minfo = locate("__mapinfo__[z]")
if(Minfo)
var/obj/mapinfo/M=Minfo
gy = 100 - y + (M.oY) * 100
gx = x + (M.oX - 1) * 100
else
gy = 0
gx = 0
is that what your talking about
Which line is the error occurring on?
Best response
map_coords[oX][oY+1] = src

This is the line that's giving the error, meaning that map_coords isn't large enough to have an item at Ox or oY+1.

How are you setting the mapinfo's oX and oY variables? Are you setting them through the map editor? I would guess they're outside the 1-9 and 1-10 range (respectively) of the map_coords list. So increase the dimensions of the map_coords list to fit whatever you're doing.
can i get a step by step process?
You'll have to tell me how you're placing the mapinfo objects and how you're setting their oX/oY values before I can elaborate much further.
Do you have msn or skype
that i can talk to you more quickly about this
im not sure how to check what im setting the oXand oY coords
Might I suggest that you spend some time following these? It might ease some of the confusion:

http://www.byond.com/forum/?post=292504
http://www.byond.com/docs/guide/
http://www.byond.com/docs/ref/index.html
none of those help me
ive tried just about everything, and i cant Isolate this damn thing i need hel finding the Needed information =.=
var
map_coords[9][10]


is that what your talking about
In response to Shikaphobia
Yes. The 9 is setting the "width" (accessed by oX) and the 10 is setting the "height" (accessed by oY). It's not big enough right now to hold the values of oX/oY that it's getting.
i changed it to 15 and 20 and the error went away