ID:140223
 
mob/var
AFK="No"
Busy="Yes"
mob/verb
AFK()
set category = "Commands"
if(usr.AFK == "No")
usr.AFK = "Yes"
usr.AFK2 = 1
world << "[usr] has gone Away From Keyboard!"
if(usr.AFK=="Yes")
usr.AFK = "No")
world << "[usr] is back!"
mob/verb
Busy()
if(usr.Busy=="No")
usr.Busy = "Yes"
world << "[usr] is now busy!"
if(usr.Busy=="Yes")
usr.Busy="No"
world << "[usr] is back!"

When I input this coding I get:
loading Jump Icon Stars.dme
AFK.dm:14:error: ): expected }
AFK.dm:14:error: location of top-most unmatched {
AFK.dm:14:error: ): expected }
AFK.dm:8:error: location of top-most unmatched {

Jump Icon Stars.dmb - 4 errors, 0 warnings (double-click on an error to jump to it)


you added an extra parentheses after usr.AFK="No"
In response to Cody123100
Thanks
I would suggest getting used to boolean variables for such scenarios, in case that you ever start with a language where this is bound to get you a decent saving on resources.
Not to mention that is just improves the readability of your source code.

mob
character
var/AFK
var/Busy
verb
AFK()
AFK = !AFK
world << "[AFK ? "[name] has gone Away From Keyboard!" : "[name] is back!"]"

Busy()
Busy = !Busy
world << "[Busy ? "[name] is now busy!" : "[name] is back!"]"
In response to Schnitzelnagler
Schnitzelnagler wrote:
I would suggest getting used to boolean variables for such scenarios, in case that you ever start with a language where this is bound to get you a decent saving on resources.
Not to mention that is just improves the readability of your source code.

> mob
> character
> var/AFK
> var/Busy
> verb
> AFK()
> AFK = !AFK
> world << "[AFK ? "[name] has gone Away From Keyboard!" : "[name] is back!"]"
>
> Busy()
> Busy = !Busy
> world << "[Busy ? "[name] is now busy!" : "[name] is back!"]"
>

I will not use that DM because I solved it WITHOUT doing that... it was because I added an extra ) on usr.AFK=1
In response to Narutorox123456
I think you misunderstood me.
I know that my suggested implementation was not to resolve your issue, as that was a simply mistake. I was trying to point out the benefits of a different approach, one that can save you a lot of resources when you start using a language like C++ and compare the different implementations on a procedure that is called quite frequently.

Or, in other words, better get used to good habit right away.
In response to Schnitzelnagler
Schnitzelnagler wrote:
I think you misunderstood me.
I know that my suggested implementation was not to resolve your issue, as that was a simply mistake. I was trying to point out the benefits of a different approach, one that can save you a lot of resources when you start using a language like C++ and compare the different implementations on a procedure that is called quite frequently.

Or, in other words, better get used to good habit right away.

I will only use the current code I know and like right now I will never go into complicated code! The normal non complicated code I know now is enough to make a game with EVERYTHING in the WORLD in it!
In response to Narutorox123456
Yeah, but some things happen to take several times the age of the universe your way.
In response to Stephen001
Stephen001 wrote:
Yeah, but some things happen to take several times the age of the universe your way.

Not always because the way I do it is really quick and the coding I use was able to make Legend Of Zelda RPG Versions 1 2 and 3 on the same day!
In response to Narutorox123456
Not to be picky, but that's not exactly "everything in the world".
In response to Stephen001
Stephen001 wrote:
Not to be picky, but that's not exactly "everything in the world".

It is actually everything in the world because you can make ANYTHING happen in the DM I use!
In response to Narutorox123456
That sounds unfortunate.
In response to Narutorox123456
Narutorox123456 wrote:
Stephen001 wrote:
Not to be picky, but that's not exactly "everything in the world".

It is actually everything in the world because you can make ANYTHING happen in the DM I use!

I'll pay $100 for a 3D game ONLY using DM. This 3D game must include a first-person perspective, dynamic lighting, dynamic weather, realistic movement similar to free-running games, a phenomenal physics where if I bump into a tree, it'll make leaves fall or when I shoot something it'll cause sparks. I wish to also have absolutely fully customizable characters from toe sizes, hairy arms, pointy noses and I also want a driving system with police that can detect if you are speeding, driving irresponsibly.
Did I mention it must be ONLY in DM not using any outside programs/sources, and must be completed in one day.
After all, you said your Zelda game had everything and it was made in DM and was easy to make, so this shouldn't be a problem for you.
In response to Maximus_Alex2003
Maximus_Alex2003 wrote:
Narutorox123456 wrote:
Stephen001 wrote:
Not to be picky, but that's not exactly "everything in the world".

It is actually everything in the world because you can make ANYTHING happen in the DM I use!

I'll pay $100 for a 3D game ONLY using DM. This 3D game must include a first-person perspective, dynamic lighting, dynamic weather, realistic movement similar to free-running games, a phenomenal physics where if I bump into a tree, it'll make leaves fall or when I shoot something it'll cause sparks. I wish to also have absolutely fully customizable characters from toe sizes, hairy arms, pointy noses and I also want a driving system with police that can detect if you are speeding, driving irresponsibly.
Did I mention it must be ONLY in DM not using any outside programs/sources, and must be completed in one day.
After all, you said your Zelda game had everything and it was made in DM and was easy to make, so this shouldn't be a problem for you.

I said my zelda game was epic... and also this is completely IMPOSSIBLE in DM... by everything in the world I meant everything TWO DIMENSIONAL!!!
Funny thing with your code, when the user comes back from AFK, he immediately goes AFK again. Oh, and your system blows, follow Schnitzel's advice. For one, he's delicious, for two, he's absolutely right.
In response to Emasym
His LOZ is probably a rip from the current LOZ source. Also he'll probably get sued for trying to make money from fan games. :P
Yeah, I wanted to say that...

Your code doesn't make sense.
If the user is AFK, then start the proc where he's not AFK?

They're offering you a simpler, much more robust method. I strongly recommend you consider it. They're trying to help you, not deter you.

And all the things that guy mentioned for creating a game ARE possible through DM. They'll take long, and won't look pretty, but they're certainly not impossible.
In response to Schnitzelnagler
Schnitzelnagler wrote:
I was trying to point out the benefits of a different approach, one that can save you a lot of resources when you start using a language like C++ and compare the different implementations on a procedure that is called quite frequently.

If using the ? operator saves you any amount of resources, you need to use a compiler that wasn't written in 1980.

Alternatively:

If you are more concerned with misguided attempts at optimization than with writing something that anybody, anywhere will understand, have you considered UNIX?
In response to Garthor
Garthor wrote:
If using the ? operator saves you any amount of resources, you need to use a compiler that wasn't written in 1980.

You kindly ignored the main point, where the original poster used strings instead of bit-flags, which, by all means is slower and more resource intense in C++, unless you are using a compiler that is going to be written in 2040.