ID:144159
 
Code:
mob
Login()
switch(input("Who's side will you be on?","Choose") in list ("Olaf","Badulairs"))
if("Olaf")
switch(input("Who on the Olaf side will you be?") in list ("Count Olaf","Esme","Madam Lu Lu"))
if("Count Olaf")
loc = locate(1,1,1)
if("Esme")
loc = locate(1,3,1)
if("Madam Lu Lu")
loc = locate(40,40,1)


Problem description:
Well I know the code is not finished but I want to test it before I do the rest =/ Can anyone tell me what I did wrong?

I need it so like... When you pick your side it will go to anouther selection screen asking witch player on that side you wish to be... If you understand me right I am sure you can help =)

Ty =)

Your whole indentation is off. I suggest reading the reference entry for 'switch()' and the DM Guide.
In response to Kaioken
I have Read it twice and I will re-look at switch...

Would'nt it be in Input Instructions?


PS: Whenever I put the indentions in the right place it just makes more errors and when I do it wrong it gets rid of the indention errors and gives me more erros...




Ok... Here im going to update and tell you more information...


When I fix the indention I get this

loading A series of unfortunate events.dme
A series of unfortunate events.dm:10: Inconsistent indentation.
A series of unfortunate events.dm:12: Inconsistent indentation.
A series of unfortunate events.dm:14: Inconsistent indentation.

A series of unfortunate events.dmb - 9 errors, 0 warnings (double-click on an error to jump to it)


When I do this wrong I get...


loading A series of unfortunate events.dme
A series of unfortunate events.dm:8:error::invalid expression
A series of unfortunate events.dm:10:error:= :expected "if" or "else"
A series of unfortunate events.dm:11:error:if :expected code block
A series of unfortunate events.dm:12:error::expected "if" or "else"
A series of unfortunate events.dm:12:error:= :expected code block
A series of unfortunate events.dm:14:error:= :expected "if" or "else"
A series of unfortunate events.dm:11:"Esme":warning: statement has no effect
A series of unfortunate events.dm:12:loc:warning: statement has no effect
A series of unfortunate events.dm:12::warning: statement has no effect

A series of unfortunate events.dmb - 6 errors, 3 warnings (double-click on an error to jump to it)







When I make them wrong I get this...
In response to Madman69
You should probably post the errors
In response to Z-warrior-Z
I just updated the post... Relook =/
In response to Madman69
So does anyone Know how to fix it =/?

I Updated my 2nd post with more information...

Plz help =/
Madman69 wrote:
Code:
> mob
> Login()
> switch(input("Who's side will you be on?","Choose") in list ("Olaf","Badulairs"))
> if("Olaf")
> switch(input("Who on the Olaf side will you be?") in list ("Count Olaf","Esme","Madam Lu Lu"))
> if("Count Olaf")
> loc = locate(1,1,1)
> if("Esme")
> loc = locate(1,3,1)
> if("Madam Lu Lu")
> loc = locate(40,40,1)
>

Try something like this.. it looks like you had an indention(spelling?) error.
In response to Valitor
loading A series of unfortunate events.dme
A series of unfortunate events.dm:7: Inconsistent indentation.
A series of unfortunate events.dm:8: Inconsistent indentation.
A series of unfortunate events.dm:9: Inconsistent indentation.
A series of unfortunate events.dm:10: Inconsistent indentation.
A series of unfortunate events.dm:11: Inconsistent indentation.
A series of unfortunate events.dm:12: Inconsistent indentation.
A series of unfortunate events.dm:13: Inconsistent indentation.
A series of unfortunate events.dm:13: Inconsistent indentation.

A series of unfortunate events.dmb - 14 errors, 0 warnings (double-click on an error to jump to


Why Do I always get these SAME errors?

Then when I fix them... It gets more complicated...
In response to Madman69
Make sure you are not copying/pasting (just statin' in case) and make sure you are using the same spacing style for that whole code block (it being either tabbed spacing or spacebar spacing.. they are different)

Try checking out the Bwicki (Developer FAQ) sometime, you might find something useful like this: http://bwicki.byond.com/ByondBwicki.dmb?ErrorCodes (an error list and why it may happen, just look for your error)

- GhostAnime
In response to GhostAnime
No dude its not the indentions... When I dont indent them right it doesnt have any of the indention errors just some other stuff...
Plz help =/

PS: I am making this code myself -_- I am not copying and pasteing...
In response to Madman69
As I said, I was just stating because a lot of people do copy/paste without understanding what the heck is going on.

No dude its not the indentions...

Um, than why does the error you gave state it's an indentation error?

Madman69 wrote:
loading A series of unfortunate events.dme
A series of unfortunate events.dm:7: Inconsistent indentation.

Fix the indentation errors. Once that is done correctly, you may get new errors.. if so, please post those errors with appropriate snippets and comments pointing which lines are what numbers in which the error(s) occurs at.

- GhostAnime
In response to GhostAnime
Ummmm I know this is off topic...

But my Tab and space button is working weird...

Like wen I press tab it doesnt Indent it just moves the arrow over 4 spaces...


And when I press space it deletes whatever is in front of it...


Plz help >.>
In response to GhostAnime
mob
Login()
switch(input("Who's side will you be on?","Choose") in list ("Olaf","Badulairs"))
if("Olaf")
switch(input("Who on the Olaf side will you be?") in list ("Count Olaf","Esme","Madam Lu Lu"))
if("Count Olaf")//It says this is an indention error after I fixed it...

loc = locate(1,1,1)
if("Esme")//It says this is an indention error after I fixed it...
loc = locate(1,3,1)
if("Madam Lu Lu")//It says this is an indention error after I fixed it...

loc = locate(40,40,1)


That should fix the indention errors right?

Anyways it says in the places I corrected were indentional errors...


loading A series of unfortunate events.dme
A series of unfortunate events.dm:7: Inconsistent indentation.
A series of unfortunate events.dm:9: Inconsistent indentation.
A series of unfortunate events.dm:11: Inconsistent indentation.

A series of unfortunate events.dmb - 9 errors, 0 warnings (double-click on an error to jump to it)
In response to Madman69
Sounds you have overwrite mode on, if you want it off, just press..

And as I mentioned before, spacebar spacing and tab spacing are different types of spacing.. if you use tab spacing and then spacebar spacing on the next line of the same code block, you'll get an error for indentation due to the different spacing styles used.. read [link] for more details

Also:
       switch(input("Who's side will you be on?","Choose") in list ("Olaf","Badulairs"))
if("Olaf")
//The following should be indented in..
switch(input("Who on the Olaf side will you be?") in list ("Count Olaf","Esme","Madam Lu Lu"))
if("Count Olaf")//It says this is an indention error after I fixed it...


- GhostAnime
In response to GhostAnime
I dont get it... I mean what did I do wrong I get 12 indention errors out of that 1... Its like everything I do is and indention error... Ahhh danget... I guess I will just use a Demo sence this code wont work for some apparent reason I dont know why it is doing this...
In response to Madman69
mob
Login()
switch(input("Who's side will you be on?","Choose") in list ("Olaf","Badulairs"))
if("Olaf")
..()
switch(input("Who on the Olaf side will you be?") in list ("Count Olaf","Esme","Madam Lu Lu"))
if("Count Olaf")
loc = locate(1,1,1)//It says indentional error here
if("Esme")
loc = locate(1,3,1)//and here
if("Madam Lu Lu")
loc = locate(40,40,1)//and here =/
if("Badulairs")
..()
switch(input("Witch badulair will you be?") in list ("Sunny","Violet","Klause"))
if("Sunny")
loc = locate(50,50,1)
if("Violet")
loc = locate(50,51,1)
if("Klause")
loc = locate(50,52,1)


Well I finialy got to code to work thanks to a few people =)

But...

Of course it has problems =O

If you put this into a DM and Run it you will see what my problem is it is really hard to explain...

The Menu is just crazy... Like when I select Badulairs it just go's in the order it was made from.. Take a look at it =/