Code:
proc // Indentation Error right here, but that's not the problem
Name()
Prompt = "Character Name"
Help_Text = "Ahh, so your new. What's your name, young one? (Must be RP appropiate, or booted on site)"
char_name = input(Prompt,Help_Text) as null|text
usr.name = char_name
if (usr.name == "") || (usr.name == null)
usr.Name()
Problem description: Well, the error I have gotten with this code is that it's "missing left-hand argument to ||". I try to fix this as much as possible, but I really have no clue, and I need a bit of help. Can anyone help?
Also, for the question:
Is the >> Operator the same as the > Operator? If so, thank you. If not, what is it, and where can it be used? By the way, it was used in this form: if(elecvotes >> highvotesearth && client in candidatesearth)
Thank you.
-Arya V.
1
2
ID:263389
Nov 29 2006, 12:32 pm
|
|
In response to Axerob
|
|
this > operator is greater than, while this < operator is less than << is wrighting to, while >> is reading.
~Grand~ |
"Is the >> Operator the same as the > Operator? If so, thank you. If not, what is it, and where can it be used? By the way, it was used in this form: if(elecvotes >> highvotesearth && client in candidatesearth)"
I say no. Generally >> is used to read in information from a savefile. I think that the example there is either a typo or elecvotes is having the value of highvotesearth placed in it(sounds fishy) . Possibly if(elecvotes > highvotesearth && client in candidatesearth) |
Please put code inside the >dm> tags.
Additionally, don't use usr in procs. It isn't safe. You should either use src or an argument passed to the procedure, depending on context. The error in question is coming from this line: if (usr.name == "") || (usr.name == null) Look at the parentheses - they're wrong. They should be: if((usr.name == "") || (usr.name == null)) Finally, the >> operator is definitively NOT the same as >. It's used for two things - first, reading data from a savefile. Second, it's the bitshift right operator. |
In response to KillerGrand
|
|
I'm sorry to say, guys, that I actually got 86 errors after that.. could it be another problem, and the DM error engine is just screwing around with me?
|
In response to Arya V.
|
|
show the code your trying to do <.<
~Grand~ |
In response to KillerGrand
|
|
world I know, I know.. It's a DBZ game. But at least it's RP! :) Could this help? Thank you. |
In response to Arya V.
|
|
world That should do it, Also dont use usr in proc ~Grand~ |
In response to Arya V.
|
|
Problems - You're still using usr in procs. In this context, it should be src. Just remove all the usrs in front of variables.
You still haven't fixed your problem, which is this: if (usr.name == "") || (usr.name == null) Throw another pair of brackets 'round the stuff inside. You need to indent under switch() statements. rand() doesn't work for fractional numbers. You'll have to write this: usr.str = rand (0.02, 0.1) As something like this: str = rand (20, 100)*0.001 What are the errors? After you fix all those, mind. |
In response to KillerGrand
|
|
Possibly you should have fixed the various other issues, too. For example, you didn't remove the usrs - if you're going to rewrite everything, write it up properly.
Also, you didn't indent under the switches, and those will throw out errors - at the very least, bugs at runtime. |
In response to Jp
|
|
actually i did i just missed it <.<
~Grand~ |
In response to KillerGrand
|
|
Err.. like I said, if I use this:
if (usr.name == ""||usr.name == null) gave me 81 errors. It tells me that all my variables are undefined, when they really are. Help? |
In response to Arya V.
|
|
are you sure there mob/vars and not world/vars.
|
In response to Arya V.
|
|
Actually if Login() is called manually, you should not use usr. Also you should be using if(!src.name) since that = both "" and null. And you should not use usr in a proc.
|
In response to KillerGrand
|
|
Yep, I am. I actually changed the whole usr labels to src, but still get 16 errors, all with not defining a variable, which I did.
|
In response to Arya V.
|
|
what are the 16 errors
|
In response to KillerGrand
|
|
These are the errors:
loading Dragonball Paradox.dme |
In response to Jp
|
|
Jp wrote:
Finally, the >> operator is definitively NOT the same as >. It's used for two things - first, reading data from a savefile. Second, it's the bitshift right operator. Also, reading data from text files. Hiead |
In response to Arya V.
|
|
Have you indented the switches?
|
1
2
you dont need the extra set of partensees
and im not positive what the << operator is, sorry o+o
-Axerob