ID:261729
 
well i ahve this verb that should work, i even put the lowest x,y,z for block first etc, but i get a runtime error that says type mismatch
heres my code
mob/proc/map_regenerate()
var/turf/A = input("Which Turf?") in typesof(/turf/blowup)
for(var/turf/T in block(locate(7,7,src.lvl),locate(25,25,src.lvl)\
-block(locate(7,7,src.lvl),locate(8,8,src.lvl)\
-block(locate(24,24,src.lvl),locate(25,25,src.lvl)\
-block(locate(7,24,src.lvl),locate(8,25,src.lvl)\
-block(locate(24,7,src.lvl),locate(25,8,src.lvl)\
-block(locate(14,13,src.lvl),locate(16,15,src.lvl))))))))
if(prob(45))
if(!T.density)
new A(T)

can someone help?
heres the runtime error
runtime error: type mismatch
proc name: map regenerate (/mob/proc/map_regenerate)
source file: Bomberman.dm,463
usr: Magnus VI (/mob)
src: Magnus VI (/mob)
call stack:
Magnus VI (/mob): map regenerate()
Guessing here. Take away - From -Block. =P

Siientx
Magnus VI wrote:
well i ahve this verb that should work, i even put the lowest x,y,z for block first etc, but i get a runtime error that says type mismatch

Ohhh... I see the problem now.

The problem is, you're not ending each block() on the line it's on, and so you're subtracting from a block(). You're subtracting from the second argument to each block() call, which is a locate(), and then you put the closing parentheses all on the last line.

Take a look at every - you see. It's inside a block() call. They're basically being set up like this:
block(turf1, turf2 - block(...))
instead of this:
block(turf1, turf2) - block(...)
See the difference?

You're getting the type mismatch because turf-list is invalid. But it shouldn't be happening, because it really should be list-list-list....

Lummox JR
In response to Lummox JR
<sarcasm>Yeah, and I understood every word of that!</sarcasm>
In response to Hazman
Simply put, Magnus forgot to close the parentheses for the blocks at the correct place and a list was trying to be removed from a turf(which is an argument for block).
In response to Lummox JR
thanks, that fixed it