Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > Python

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-15-2008, 09:50 AM   PM User | #1
jburow
New to the CF scene

 
Join Date: Jul 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jburow can only hope to improve
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.
jburow is offline   Reply With Quote
Old 07-15-2008, 10:03 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
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.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

Last edited by abduraooft; 07-15-2008 at 10:10 AM..
abduraooft is offline   Reply With Quote
Old 07-15-2008, 10:07 AM   PM User | #3
jburow
New to the CF scene

 
Join Date: Jul 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jburow can only hope to improve
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.
jburow is offline   Reply With Quote
Old 07-15-2008, 10:14 AM   PM User | #4
jburow
New to the CF scene

 
Join Date: Jul 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jburow can only hope to improve
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)
jburow is offline   Reply With Quote
Old 08-08-2009, 06:14 PM   PM User | #5
Railon
New to the CF scene

 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Railon is an unknown quantity at this point
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.
Railon is offline   Reply With Quote
Old 08-20-2009, 03:07 AM   PM User | #6
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,233
Thanks: 4
Thanked 81 Times in 80 Posts
Spookster will become famous soon enough
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
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:48 AM.


Advertisement
Log in to turn off these ads.