Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Error Help : Inconsistent Indentation

    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.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Well, I searched google for your error and knew that it's something related to Python, Lol

    Request a moderator to move this to the right forum.
    Last edited by abduraooft; 07-15-2008 at 10:10 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry

    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.

  • #4
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)

  • #5
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •