Hey. I'm trying to make a Marauder's Map. There's one in Hogwarts: A History. I can't seem to figure out how to get it to work right. Could anyone point me in the right direction? Or show me a segment of a code that would help me? I need it to give the person's name and their location. Please, any help would be nice.
ID:158225
![]() Oct 5 2009, 3:39 pm
|
|
http://www.youtube.com/watch?v=9G_SdCcYFJw
I also thought about applying this concept as a game. It was a pretty cool idea coming from what's her face. ts |
Calus CoRPS wrote:
Gregs wrote: |
for(var/client/C) Display however you wish, and assuming you have named areas (which is what C.mob.loc.loc is grabbing). |
Garthor wrote:
for(var/client/C) I'd advice on making sure not to generate a runtime error here, if I may, since you might get flooded rather fast if you have a hundred players on-line, of which some might be 'in the void (null)'. |
Schnitzelnagler wrote:
Garthor wrote: for(var/client/C) I'd advice on making sure not to generate a runtime error here, if I may, since you might get flooded rather fast if you have a hundred players on-line, of which some might be 'in the void (null)'. I left that as a learning experience. |
Schnitzelnagler wrote:
Garthor wrote: for(var/client/C) I'd advice on making sure not to generate a runtime error here, if I may, since you might get flooded rather fast if you have a hundred players on-line, of which some might be 'in the void (null)'. runtime error: Cannot read null.mob |
So. I'm trying to implement a item in the game kind of like the Marauder's Map from Harry Potter. And what the map does is, tells people location. Now, I kind of have any idea for the code and its:
obj |
Not entirely sure that this is what you are looking for but it seems like you are trying to display the area that people are in.
The following should do it: proc/get_area(var/area/a) |
Why would you take my entirely reasonable format of looping through clients and replace it with the utterly boneheaded format of looping through mobs looking for ones with clients?
|
What you are doing wrong is indentation, and then declaring a client/C variable for the obj instead of fixing THAT error.
|
Garthor wrote:
Why would you take my entirely reasonable format of looping through clients and replace it with the utterly boneheaded format of looping through mobs looking for ones with clients? Well yours gave me a proc error when i read it in game. So if you tell me how to fix it. I would be more then glad to use yours. |
He already told you the problem: [link]
Compare your code to the for() loop in Garthor's initial example in this thread. |
Do you mind explaining what a "Marauder's Map" is?