ID:139957
 
Code:
if(usr.havewand == 1)
usr << "Josh: hmm you already have a wand.."


Problem description:
loading Explore Hogwarts.dme
npcs.dm:25:error: inconsistent indentation
npcs.dm:24:error: : expected a constant expression

Explore Hogwarts.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)

well as far as I know, I indented it right and I made the if statement align with its previous one ( I know this for SURE)
and the if's effect is tabbed so it should be correct..
you can make it say:
if(usr.havewand)

as opposed to putting in == 1 to shorten the code, they have exactly the same meaning.
Second, your code looks like you have 2 tabs before the usr << output. You need to give us the entire block of code.
In response to JoEn00b (#1)
didn't work, and I only had one tab..
but here's the whole code:
mob/NPC/Josh
icon = 'npcs.dmi'
icon_state = "josh"
HP = 99999
verb/Shop()
set src in oview(2)
switch(alert("Welcome to Josh's Wand Shop, would you like a wand?","Shop","Yes","No"))
if("Yes")
usr.havewand = 1
usr << "Josh: Well, the wand chooses the wizard so, I can't just *give* you a wand. *chuckles*"
sleep(30)
usr << "Josh: However, I can let you test them."
sleep(30)
usr << "Josh: Maybe this one?"
sleep(30)
usr << "Josh :No dice, so definately not."
sleep(30)
usr << "Josh:Try this one and say accio!"
sleep(10)
usr << "You: Accio!"
sleep(20)
usr << "Josh : YES YES that one is excellent"
if("No") usr << "Josh: Okay then"
if(usr.havewand)
usr << "Josh: Well you seem to have a wand already.."
In response to BeignetLover (#2)
The line if(usr.havewand) is in with your switch statement. You will have to move it back 1 tab, and the line following it also.

You may also want to move it to the top of the block, and add a return to it so it will not execute the rest of the code.
In response to Pirion (#3)
dude, thanks, that did it :) you will be in the credits for my game.
In response to BeignetLover (#4)
Bad boy! wand shop owner is Ollivander.
In response to Rickoshay (#5)
lol not doing ollivander for 2 reasons: 1. My Harry Potter game takes 40 years after the deathly hallows.

2. Copyright
In response to BeignetLover (#6)
BeignetLover wrote:
2. Copyright

[sarcasm]I'm sure that 'Harry Potter' and 'Hogwarts' aren't trademarks/copyrighted, whereas Olivander certainly is.[/sarcasm] ^^

As to not completely derail the thread, have you considered to save on the extra variable and simply check if the player has a wand in use/in the inventory?
Otherwise you might end up with a horrible mess of variables.
In response to Schnitzelnagler (#7)
it's fixed, and no, harry potter will NOT be mentioned in my game, and every mention of hogwarts will be replaced with Explore Hogwarts.