func generate(map:TileMap, map_Width, map_Height, minRoomSize, maxRoomSize):
var potentialRooms:int = 3#figuring out max number of rooms by checking how many max size rooms can fit
var rooms:Dictionary
var room:Room
var position:Vector2
var start:Vector2
var end:Vector2
var modifier:int
var key:String
# Fill map with solid tiles, adding a border of solid tiles around the map
for r in range(-1, map_Height + 1):
for c in range (-1, map_Width + 1):
map.set_cell(0, Vector2i(c, r), 0, Vector2i(Tiles.SOLID, 0))
room.position = Vector2(0, 0)#setting the position of the first room
Question
when the program hits the âroom.position = Vector2(0, 0)â line I get the error âInvaild assignment of property or key âpositionâ with in the value of type âVector2â on base object of type âNilââ which does not make sense because Iâm trying to set its value.