27 Sep, 2010, thaolen wrote in the 1st comment:
Votes: 0
Hello, I would like to load a mob in any room wherever I type wish from my earlier module. Part of the code is this.

mob = load_mob("genie_lamp@examples", "treasure_room@examples", 'standing')


''' 
wish_command.py :By Almark
'''
from char import load_mob
import mud, mudsys


def wish_cmd(ch, cmd, arg):

# arg.lower() == "i wish":
mob = load_mob("genie_lamp@examples", "treasure_room@examples", 'standing')
mud.message(ch, None, None, None, True, "to_char",
"Suddenly a Jinn appears waiting to grant your wish")


mudsys.add_cmd("wish", None, wish_cmd, "player", False)

I changed the code to
mob = load_mob("genie_lamp@examples", None, 'standing')


and of course I got this error
Error:

[LOG: Error running Python command, wish:

Traceback (most recent call last):
File "../lib/pymodules/wish_command.py", line 11, in wish_cmd
mob = load_mob("genie_lamp@examples", None, 'standing')
TypeError: Load char failed: invalid load-to type.

]


Is there a way to summon the mob without the need for a certain room?
27 Sep, 2010, David Haley wrote in the 2nd comment:
Votes: 0
Don't you have a way of getting ch's current room?
27 Sep, 2010, thaolen wrote in the 3rd comment:
Votes: 0
Quote
Don't you have a way of getting ch's current room?
David Haley:


I'm not sure, i'm still learning NM, I tried to add 'ch' to

mob = load_mob("genie_lamp@examples",ch , 'standing')

but had the same error.
27 Sep, 2010, David Haley wrote in the 4th comment:
Votes: 0
It looks like it expects a room. So you need to get the character's room's ID, and not pass the character itself (what did you think would happen?). You'll have to read the documentation for how to do that; I don't know NM.
27 Sep, 2010, thaolen wrote in the 5th comment:
Votes: 0
Understood David ;)
I used the rooms id at first and of course my Jinn is summonded there. But I was wondering how to make the mob summon to you no matter where you are. But as you said your not familar with nakedmud thats understandable :)
27 Sep, 2010, David Haley wrote in the 6th comment:
Votes: 0
Did you try searching the documentation for characters for 'room'? I just looked over it, and the documentation for rooms, and it seems pretty clear how to get a character's room's prototype ID.
27 Sep, 2010, thaolen wrote in the 7th comment:
Votes: 0
thanks, yes I look over the API daily, I don't want to appear dull, but sometimes others find things you don't see.
28 Sep, 2010, chrisd wrote in the 8th comment:
Votes: 0
thaolen said:
Is there a way to summon the mob without the need for a certain room?

No. If you really want to do this (and you shouldn't), just create a room that players can't get to and load mobs into that room.

You seem to be bringing every little problem you have with NakedMud to these forums without even trying to solve them yourself.

This is not an NM issue, it's not even a Python issue. David seems to have figured out this problem and he's not an NM guy. You know what you have (the character that used the command) and you know what you want (the mob to be loaded into the room the character is in). You already know how to load a mob into a given room, so all you need to figure out is how to find out what room a character is in. Instead of doing that you tried giving it None, then you tried giving it a character, and you're surprised when giving it a character produces the same "you're giving me the wrong type!" error as giving it None? It wants a room, so give it a room.

It's really not hard. Use the API to find out how to get a character's room. If you honestly cannot do that, then I'm afraid that you will appear dull, because I am looking at the answer right now, and it is clear as day.
28 Sep, 2010, Rudha wrote in the 9th comment:
Votes: 0
Is it really necessary to piss on someone because you don't want to answer on their questions? Some things that seem easy to those of us whom have been programming for a long time are not as obvious nor easy to those whom haven't.

Maya/Rudha
28 Sep, 2010, chrisd wrote in the 10th comment:
Votes: 0
Rudha said:
Is it really necessary to piss on someone because you don't want to answer on their questions? Some things that seem easy to those of us whom have been programming for a long time are not as obvious nor easy to those whom haven't.

Maya/Rudha


I did not "piss" on thaolen. I answered his question (first line of my post) and then tersely explained that he needs to work on his problem solving as well as giving him a nudge in the right direction for this particular problem. If you want to give him the working code, go right ahead. I happen to think that he'd be better off figuring it out for himself. Furthermore, I reserve the right to be as terse as I please with this particular poster, because he has blatantly disregarded help (often in the form of code) and advice given politely and in good faith by myself and other members of the NakedMud community.
28 Sep, 2010, Rudha wrote in the 11th comment:
Votes: 0
Quite frankly if the "polite" help that's been offered at all resembles the kind of thing here, I should think that it comes off as condescending and rude. Perhaps you don't see it that way, but every time he has posted here people from the NakedMud IRC have inevitably posted usually in hostile terms about how he should figure it out himself. I'm not sure what you think you're accomplishing by biting the newbies, but it's not productive.

Everyone learns once, and sometimes there's more to be learned than simply API specifics.

Maya/Rudha
28 Sep, 2010, David Haley wrote in the 12th comment:
Votes: 0
I think the frustration is due to the fact that there seems to be resistance to the instruction of fishing, with an expectation for fish instead. :thinking:

The API documentation I linked to earlier says exactly how to get the room from a character object. All you have to do is search for "room" on the page and go past the first few entries. I think that it's important that at least this much be understood. If it is not understood, the poster should say what it is that they do not understand, instead of a generic "I don't get it". The answer might very well be "you need to learn Python", or it might be understanding the difference between an object (the room) and a string attribute on that object (its id). But really, we're looking at a very fundamental issue here, with an answer stated pretty much as clearly as it possibly could be in the documentation. If the documentation is unclear, then the poster should pick the documentation that is unclear and explain why. I think some frustration is also due to the fact that the poster in question seemed to not take the time to read that a certain function had 3, and not 4, parameters.

The tone might have been somewhat harsh but people need to understand that the best way to get fewer and fewer answers to questions is to keep asking ones that show a lack of basic research or understanding due to not doing one's homework. The best way to get more, and better quality, answers is to show that you're trying, and to ask properly formulated questions. There's only so many times somebody will just provide the solution before they get bored. It's also a question of respect: if somebody is so fast and posts questions so readily that they get sloppy, and expect other people to do the work for them, isn't it kind of rude to expect them to spend time on your problems when you stop at the first barrier?

Hopefully we can all put this behind us and continue helping a new community member, however all new people need to understand that they need to put their time in too.


EDIT: this was made in response to chrisd's post, as Rudha hadn't posted. Rudha, were you referring to my posts above as condescending and rude, or talking to chrisd? It wasn't clear to me who you were addressing.
28 Sep, 2010, Rudha wrote in the 13th comment:
Votes: 0
Seems we were stepping over each other a little bit here; I was responding to chrisd. Apologies for the confusion.

A lot of people - myself included - more or less learned (or are learning) by programming MUDs, and it's infinitely more helpful to explain why things work how they do, or the method you used to find or research something, than it is to exasperatedly say "read the fucking manual!"; the latter really does no lasting good and just creates ill-will. This is kind of why I've avoided the IRC, from the experiences of the people I work with coding Elvenblade, we're kind of looking at the tip of the iceberg as regards that.

I suggested to thaolen in a private message that he would probably do well asking an experienced programmer (such as myself) to take them through things before they start flooding the board with questions; I think we can both agree that his problems here, while we can individually provide the answers, are more indicative of a general lack of experience that perhaps some mentoring or other closer working with would be more of a solution to; that said, being aggressive with him is not the proper solution and I don't think that the NakedMud "crew" are helping anything by being that way towards Thaolen; or for that matter the other people whom I've heard complaints from.

I think I'll leave it at that before I end up massively derailing that thread, and reply to any further enquires/comments/gripes that I'm an evil evil woman in private messages.

Maya/Rudha

[edit] Fixed the URL tag
28 Sep, 2010, David Haley wrote in the 14th comment:
Votes: 0
Rudha, you evil woman! I hereby gripe about you! :devil:

For what it's worth, I was hoping to provide the method for finding the answer; by going to the API for the character, you find stuff that you can get from the character. By then searching for 'room', you can find anything related to rooms. This is how one finds answers to one's own questions; hopefully this can be useful to Thaolen. I'm more than happy to answer more questions like that, however I think there is very great value in finding things yourself – although of course sometimes you need to be shown how.
28 Sep, 2010, Rudha wrote in the 15th comment:
Votes: 0
Actually, on that thought, the API documentation would probably be a lot easier to use if there was some sort of searchable index; the current documentation is only helpful if you know what module the function is under - I, myself, have had to go fishing through it more than once for a given function, particularly in a few instances of the general mud functions that can all generally fall under 'mud' 'mudsys' or a couple other modules.

This is why I like to use NaturalDocs for my own documentation, but in either event an index of some sort would probably be helpful.

Maya/Rudha
28 Sep, 2010, thaolen wrote in the 16th comment:
Votes: 0
Quote
Actually, on that thought, the API documentation would probably be a lot easier to use if there was some sort of searchable index;
Maya/Rudha


You said it! half the time I strive to learn the language, I'm stumped for hours, I spend every waking moment on NM at least 8 hours a day, I have no life anyway but that doens't matter. I work hard at it.

I do apprecaite the critism but not the negitive. So i'm a novice. Albert Einstein asked a lot of questions when he was in school, not because he was dumb but due to the fact he wanted to learn eveything. Now Im not Einstein nor do I NOT read the manual or Nor do I not read Python tutorials, I'm a slow learner. I even provide code, errors in blocks. I'm not lazy either, somethings really confuse me, so the best thing I can do is ask questions, I stay away from IRC just like Rudha for the same reason. All i'm after is some friendly help not badger the novice. Thank you.
28 Sep, 2010, chrisd wrote in the 17th comment:
Votes: 0
Rudha said:
Actually, on that thought, the API documentation would probably be a lot easier to use if there was some sort of searchable index; the current documentation is only helpful if you know what module the function is under - I, myself, have had to go fishing through it more than once for a given function, particularly in a few instances of the general mud functions that can all generally fall under 'mud' 'mudsys' or a couple other modules.

This is why I like to use NaturalDocs for my own documentation, but in either event an index of some sort would probably be helpful.

Maya/Rudha


This is a good idea and I would happily put such documentation up at nakedmud.org.

Unfortunately, rewriting all the comments into something like NaturalDocs' format would be somewhat time-consuming and I also don't have the faintest clue how to generate documentation for the "builtin" modules (mud, char, etc). Any clues would be appreciated.
28 Sep, 2010, chrisd wrote in the 18th comment:
Votes: 0
thaolen said:
I do apprecaite the critism but not the negitive.

Does positive criticism exist?

thaolen said:
So i'm a novice. Albert Einstein asked a lot of questions when he was in school, not because he was dumb but due to the fact he wanted to learn eveything.

I do not care that you are new. I was new once. I help new people all the time. I do not care that you ask a lot of questions. I asked a lot of questions when I was new. I still do. Sometimes I ask very dumb questions. It's totally fine if you come to MB or #nakedmud with a question that's stumped you. It's totally fine if it's a really simple question with a really simple answer. I don't expect you to know everything instantly, or to be able to solve all these problems by yourself.

What's irritating is that you often don't seem to even try to solve problems yourself. When you do try you do something weird that betrays a lack of basic knowledge - some of which you should have accumulated in the past two months. Most importantly, when people offer you help you often seem to ignore them, or you misinterpret their posts, or you acknowledge their help, thank them for it, and then later ask the exact same question. It is not your ignorance that frustrates me - everyone is ignorant at some stage, and it can be overcome. The problem is your attitude. Read David's post.

thaolen said:
All i'm after is some friendly help not badger the novice. Thank you.

I answered your question. If you would prefer that I not do that in future unless I am friendly, then I shall respect your wishes.
28 Sep, 2010, thaolen wrote in the 19th comment:
Votes: 0
I'm ok with anyone answering my questions :)
But I come from the old school I guess, granted a few might not be cheery in their answering.

I think the discussion has come to it's end. Btw I have been helped more than one could imagine from posting here at mudbytes. I don't ignore answers, and sometimes I'm a bit to proud to say "well that didn't work" and by doing so I insult the person that took their time to answer me. So not to offend that person I don't say much but try to figure it out on my own plus try to understand its meaning if I can at all.

And there is such a thing as positive criticism. ;) Sounds like a oxymoron

Many times even tutorials on NakedMud don't work for me, I type them just like they are and the code doesn't work for some reason, could be older version, so I post here and ask how to make it work.

EDIT:
Quote
Did you try searching the documentation for characters for 'room'? I just looked over it, and the documentation for rooms, and it seems pretty clear how to get a character's room's prototype ID.


Ok with David's quote, I really don't see in the API but he did, more likely due to the fact that he was more familiar with API docs. But I did read it and try to figure it out, I looked in the room part. When I get a new question answered I learn even more. And then I don't ask so much, Its my goal to learn this without asking every day, I don't want to annoy anyone.

I learned Linux on my own, but programming has never been my stong point. I'll try to ask more advice when someone says do this. If I have a bad attitude I'm sorry. But I really don't, I get defensive yes. But only after I have been called down many times.
28 Sep, 2010, David Haley wrote in the 20th comment:
Votes: 0
thaolen said:
Ok with David's quote, I really don't see in the API but he did, more likely due to the fact that he was more familiar with API docs.

I think it was the 8th occurrence of 'room' on the page; did you see the 'room' attribute? If so, that is the answer to your question.

I understand what you say about being too proud to say that you don't understand an answer, but in the end of the day you will have to let go of that ego if you want to move ahead efficiently.
0.0/23