mob
Bump(M)
return
if(istype(M,/mob/shopkeeper/Curly))
global.shopcontents = M.contents
But whenever I compile it it comes up with this error:
ShopKeepers.dm:118:error:M.contents:undefined var
could someone help me.
ID:269647
Aug 23 2005, 10:37 pm
|
|
This is my code
mob But whenever I compile it it comes up with this error: ShopKeepers.dm:118:error:M.contents:undefined var could someone help me. |
ADT_CLONE wrote:
ShopKeepers.dm:118:error:M.contents:undefined var That'd be because M isn't pointing to anything. That and you're cancelling the proc with return before it even gets to the check. mob ~Sinyc. Edit: Whoops. Exactly what GhostAnime said. =/ |
In response to Sinyc
|
|
Thanks
|
ADT_CLONE wrote:
This is my code
global.shopcontents = M.contents
Not exactly the best idea there. Whenever you edit the shopcontents list you'll be editing the M.contents list too. More likely you need a copy of that contents list, not the list itself. Lummox JR |
In response to Lummox JR
|
|
I dont want to edit it, I just need to know what mobs contents to display
|
2) You put Bump(M) which is basically var/M ... what you want is Bump(atom/M) if you're planning to use Bumps for things other than mobs (like objs)... atom's have the built-in variable (the contents list) >.>