what the [censored] does that mean?
[Moderator Note: Violating word removed. - Alathon]
ID:148373
![]() Mar 14 2003, 6:55 am (Edited by moderator on Mar 14 2003, 7:40 am)
|
|
ok, i fixed this but now i get
proc definition not allowed inside another proc in the code: mob Login() usr.name = input("Choose a name for your character.","Your Name",usr.name) usr.icon_state = input("What do you want to be?") in list ("Austin Powers","FBI") usr.Move(locate(15,15,1)) if ("Austin Powers")<---this line mob icon = 'Austin.dmi' var hp = 25 str = 10 def = 5 if ("FBI") mob icon = 'Alex.dmi' icon_state= 'MIB' var hp = 25 str = 10 def = 5 |
There's so many errors in the way you are trying to do that.
First off, you shouldn't be using usr in procedures. In this case, src will do. Second off, you are indenting every line after the next. You don't simply indent one line after another. Indentation shows possession. The Login() procedure is indented once under mob because its possessed by the mob datum. if("Austin Powers") will always be true, because the text string "Austin Powers" is not "", 0 or null, which is the only case where an if() will not execute the code indented under it. if what is "Austin Powers"? You cannot declare mob variables inside a procedure like that. If you want to change their icon, icon_state, hp, str or def, do so by changing src.str, etc. It looks like you looked at some code, copy-pasted it, looked at some other code, copy-pasted it, and then wrote some more based on what you saw. I suggest you re-read some beginners tutorials, and perhaps look at the FAQ. You are going about things in a very wrong way =) |
ok, i'm a n00b in this, i've read the stuff and i tried a lot on this code, and i think the next one is the best one i've made, but still same error on one line, please tell me the excact code that'S right:
mob Login() usr.name = input("Choose a name for your character.","Your Name",usr.name) usr.icon_state = input("What do you want to be?") in list ("Austin Powers","FBI") usr.Move(locate(15,15,1)) if() ('Austin Powers' set icon 'Austin.dmi') if() ('FBI' set icon 'alex.dmi' icon_state 'MIB') it's line : if() ('Austin Powers' set icon 'Austin.dmi') |
mob
Login() usr.name = input("Choose a name for your character.","Your Name",usr.name) usr.icon_state = input("What do you want to be?") in list ("Austin Powers","FBI") usr.Move(locate(15,15,1)) if() ('Austin Powers' set usr.icon 'Austin.dmi') if() ('FBI' set usr.icon 'alex.dmi' icon_state 'MIB') |
ShakerDeath wrote:
ok, i'm a n00b in this, i've read the stuff and i tried a lot on this code, and i think the next one is the best one i've made, but still same error on one line, please tell me the excact code that'S right: Im not going to tell you the exact code that is right, because thats not what this forum is here to do. Fortunately for you(Because you'll benefit from it) this isn't a forum to spoonfeed people answers when they don't know how to code. You need to read through some tutorials, or the faq, or the reference, or get the blue book. Attempting to keep recreating the same code, using widely different and just as incorrect code isn't going to help anything. Again, you do not indent every line after the next. Nothing I can say can help you until you understand the fundamental basics of the language. If I gave you a fixed version of that procedure, you would not benefit. Why? As soon as you need something else done, you will be back here, asking for someone to fix your code. |
An argument is information that is passed into a proc, as in rand(1,20), the numbers one and twenty are arguments. A definition is the defining of information, as in mob/var/shirt, the shirt variable is being defined.
With that information known, you can come to the conclusion that a bad argument definition means that you have a proc with information being passed into it that improperly defined.
-Loduwijk