...

View Full Version : Error Help : Inconsistent Indentation



jburow
07-15-2008, 10:50 AM
Every time I compile on the program im useing it says error Inconsistent indentation. I finally got the thing workign then added probably one of the biggest parts so far and I dont know whats wrong I've been trying to figure it out. I have no clue if I am useign java script or not but I am pretty sure I am.

Please help.

abduraooft
07-15-2008, 11:03 AM
Well, I searched google (http://www.google.co.in/search?q=Inconsistent+indentation&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a) for your error and knew that it's something related to Python, Lol

Request a moderator to move this to the right forum.

jburow
07-15-2008, 11:07 AM
Well i checked and this is javascript but it is under a program BYOND its meant to make javascript for games and I and a few other guys have just started working on this but I know the least out of all of us and yeah they can't help at the moment so I need help and now I went into it and compiled again and it said 4 errors when befor I only had 1 error.

jburow
07-15-2008, 11:14 AM
Ok this is weird i copyed my script and saved under something else and then messed with it I don't know what I did but now I am back to haveing only one error but i still can't figure it out I'll post it here I need this to work it is important. Thank you.



mob
Login()
switch(input("Would you like to Load a saved game or start a new one?") in list("New Game", "Load Game", "Exit"))
if("New Game")
src.ChooseCharacter()
if("Load Game")
src.Load()
if("Cancel")
src.Logout()
proc/ChooseCharacter()
src.name = input("What would you like your name to be?","Name input")
switch(input("Choose a class.") in list("Archer","Warrior"))
if("Archer")
icon = 'Long Range People.dmi'
icon_state = "archer"
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] has joined Acacial Prodegy."
loc = locate(1,1,1)
Save()
if("Warrior")
icon = 'Warrior.dmi'
icon_state = "Warrior"
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] has joined Acacial Prodegy."
loc = locate(1,1,1)
Save()
proc/Load()
var/savefile/F = new("saves/[src.key].sav")
cansave = 1
Read(F)
var/lx,ly,lz
F["last_x"] >> lx
F["last_z"] >> lz
loc = locate(lx,ly,lz)
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] has logged into Acacial Prodegy."
Save()
proc/Save()
var/savefile/F = new("saves/[src.key].sav")
Write(F)
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z
src << "<small><font color = red><b>Save info: <font color = black>Your game has been saved"
sleep(900)
Save()
..()
Logout()
if(cansave)
Save()
world << "<small><font color = red><b>[src] has left Acacial Prodegy."
..()
del(src)

Railon
08-08-2009, 07:14 PM
If anybody else has this problem its because you just have spaces instead of tabbed indents. This usually happens when copying and pasting code, just delete the spaces and tab indents into the code, it'll work fine.

Spookster
08-20-2009, 04:07 AM
And change your editor if possible to use spaces instead of tabs if it uses auto indentation. Spaces will be consistent from editor to the next however tabs may not.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum