ID:139811
 
Code:
mob

Logout()
if(usr.start==1)
return
else
usr.Save()
world << "<font color=#808000 size=1><u><b>Naruto: Fallen Shinobi Information:</u><font color=lime size=1>[html_encode(src)] has logged out"
del src
Login()
usr.loc = locate(7,7,1)
usr.start = 1
client.show_verb_panel = 0
usr.npc = 0
usr.noit = 0
usr.Load()
usr.CreatChar()




mob
proc
CreatChar()
var/list/clans = list("Uchiha", "Kaguya","Hyuuga","Akimichi","Aburame","Inuzuka","Nara","Haku","Taijutsu Specialist","Sand Manipulator","Medical-Nin")
src.name = input("What do you want to be called?",src.key,src.name)
src.Clan = input("Select a clan.","Clan", src.Clan) in clans
switch(Clan)
if("Uchiha")
if(src.clany)
return
src.clany = 1
switch(input("Are you sure you would like to be Uchiha?", "Uchiha") in list ("Yes","No"))
if("Yes")
usr<<"You have chosen the Uchiha clan!"
usr.Uchiha=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Uchiha"
usr.Inuzuka=0
usr.chosen = 1
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.Nara=0
usr.NonClan=0
usr.Aburame=0
usr.Akimichi = 0
usr.view = 6
usr.loc = locate(94,7,20)
if("No")
return


Problem description: I'm still new to the world of BYOND Development, and I can't seem to solve this problem. I get 21 errors of Inconsistent Indentation and everything I do doesn't help. Any help at all is gladly accepted, thank you.

Never mind, problem solved.
In response to TheDarkJak (#1)
TheDarkJak wrote:
Never mind, problem solved.

Just as a reminder for the future: You can delete your own posts that have not been replied to.
You have many inneffficencies in that, I suggest you read the guide before progressing.

Instead of using 1's and 0's for true and false statements, you should be doing checks with the !(NOT) operator, setting them to 1 or 0 only if you aren't handling it in parenthesis.

var/can
mob/verb/can()
if(can)
can = null
src << "CAN == [can]"
else
can = 1
src << "CAN == [can]"


Inconsistent indentation is just a typographical error.

Instead of having to set all of those variables for your clan, you can just have ONE variable which sets them all up, but still have it be simple. This is an example of how you can do this:

#define UCHIHA 1
#define HYUUGA 2
#define JASHIN 3

mob/var/clan

var/Uchihalist = newlist()
var/Hyuugalist = newlist()
var/Jashinlist = newlist()

mob/verb/set_clan()
clan = input("Input a number for your clan. 1 = Uchiha, 2 = Hyuuga, 3 = Jashin")
if(clan<1 || clan>3)
src << "You must use a proper variable"
return
else
if(clan == UCHIHA)
contents += Uchihalist
else if(clan == HYUUGA)
contents += Hyuugalist
else if(clan == JASHIN)
contents += Jashinlist

/*Note, this Input statement shouldn't be made like this because of its' quirkiness,
and it is not too great at all, it is just to use as a test to show an example of
how the #define procedure can be used */


So as you can see, you have a lot to work on, so once again, read the guide if you truly want to become a good programmer.
In response to OrangeWeapons (#3)
OrangeWeapons wrote:
>  if(clan!=UCHIHA||JASHIN||HYUUGA)
>

That will always be true.

It gets read like this:
if((clan != UCHIHA) || JASHIN || HYUUGA)


which will always be true as JASHIN or HYUUGA by itself is a 'true' value.

What you meant was
if(clan != UCHIHA || clan != JASHIN || clan != HYUUGA)
or
if(!(clan in list(UCHIHA, JASHIN, HYUUGA))


Also, the output for failing that will never run because the return statement runs first.
In response to OrangeWeapons (#3)
furthermore as an addition to everything these guys have said.

Do NOT use the source for NWOTS that you are currently using it is bad and inefficient if you intend to use that for any purpose at all do not release your game to the general public as there is already enough rips out there.
In response to Destroy (#4)
Okay, and thank you all for your replies, they have been very helpful. :)

And by the way, I'm not USING NWOTS for a RIP, I'm simply referencing some of the code because I'm still learning and I've heard it helps to look at other sources.
In response to TheDarkJak (#6)
Kk, id advise against even looking at that source as it is a bad example of how things are to be displayed and work. there are many other tutorials and or sources that you can look out.

If your willing to search for it although not advised you could find the GoA source which would be much more educational then a NWOTS source.

Or use the natural method everyone else uses and read through the DM Guide and the vast amount of resources/ dream maker threads.
In response to Destroy (#4)
Thanks for that, I hadn't noticed it.

By the way, I noticed a small 'error' in your game while playing it. When using whisper, you are given a list of every mob in the world to whisper, when you should just be given a list of the ones owned by clients.
In response to Midgetbuster (#7)
He wouldn't want to use GOA source to code from. Everything is vars for everything. And it's too big so it would probably be confusing for him. Yea don't use WOTS. There's like 43 and a half rips out thee tat use WOTS.
In response to TheDarkJak (#6)
TheDarkJak wrote:
And by the way, I'm not USING NWOTS for a RIP, I'm simply referencing some of the code because I'm still learning and I've heard it helps to look at other sources.

If you need to use stolen code, I would imagine that you are not ready to create your game.

It is always advice not to rummage through a BYOND game's source code. The code is usually inefficient and you are better off learning on your own. Try using the DM Guide as your reference. Remember, if you come across a problem, you can always return to these forums and ask for help.