ID:138975
 
Code:


Problem description:


mob
var
Wild
wandering



mob
proc
Pokemon_Spawn()
for(var/mob/client in oview())
if(usr.Wild==1)
return
if(prob(15))
var/mob/Pokemon/Poochyena/S=new()
S.loc=(locate(src.x, src.y-1, src.z))
S.wandering=1
S.Wander()
var/H=rand(30,200)
var/St=rand(30,100)
var/D=rand(20,100)
var/L=rand(2,20)
S.hp=H
S.str=St
S.def=D
S.maxhp=H
S.level=L
usr<<"Wild [S] poped up out of no where!"
sleep(150)
usr.Wild=0
if(S.owner==usr)
return
else
del(S)
return
return

mob
proc
Wander()
if(src.wandering==0)
return
else
var/w=rand(1,6)
if(w==1)step(src,NORTH)
if(w==2)step(src,SOUTH)
if(w==3)step(src,EAST)
if(w==4)step(src,WEST)
spawn(15)src.Wander()

theres the code
so why do i get
Spawn.dm:27:error: inconsistent indentation
Spawn.dm:28:error: inconsistent indentation

Pokemon Source[Storms Title].dmb - 17 errors, 0 warnings (double-click on an error to jump to it) (i only posted two of the errors as there all the same

Code goes INSIDE the DM tags.

You get the error "Inconsistent indentation" because, GASP, you've indented inconsistently. Fix your indentation and you fix the errors.

Are you people completely incapable of reading what the compiler is telling you is wrong? I've seen several of these threads asking what the issue is when the only problem seems to be indentation.

Are kids these days just so impatient and unable to think for themselves that they can't find it within themselves to give it 5 seconds' thought and actually TRY to handle it?
In response to Robertbanks2
Please no rage thread.

Most likely it's ripped source and he's trying to learn, or rip.

Remember yourself! Wasn't it complicated to learn everything? Why you have to indent, what it means, etc.
In response to Zaoshi
Zaoshi wrote:

Most likely it's ripped source and he's trying to learn, or rip.

Which would be even worse than someone who just doesn't understand.

Remember yourself! Wasn't it complicated to learn everything? Why you have to indent, what it means, etc.

No, no it wasn't. I was 12 when I started programming and I understood well enough from piddling around in the built in help file how to handle the basic structure.

If you're being sarcastic... Well, you aren't very good at it. If not, excuse me while I bash my head against the nearest sharp corner a few times.
In response to Robertbanks2
i am not ripping >_> i just didnt know how to Spawn pokemon, so i askd someone and he sent me this code, and because ive never seen a pokemon_Spawn() thing its difficult for me to know as i have never seen one but this one
In response to Robertbanks2
Robertbanks2 wrote:
No, no it wasn't. I was 12 when I started programming and I understood well enough from piddling around in the built in help file how to handle the basic structure.

Then you're one of them... Programmers...

I had difficulty learning stuff because of lack of help. Tutorials can't seem reach me. It's better for me to mess with source.
In response to Zaoshi
stop arguing this is ment to be a topic so you can help people
In response to Dazzer
Dazzer wrote:
stop arguing this is ment to be a topic so you can help people

You get the error "Inconsistent indentation" because, GASP, you've indented inconsistently. Fix your indentation and you fix the errors.

I answered your question ages ago, the issue is that you indented inconsistently. Fix the indentation.
In response to Robertbanks2
Robertbanks2 wrote:
Dazzer wrote:
stop arguing this is ment to be a topic so you can help people

You get the error "Inconsistent indentation" because, GASP, you've indented inconsistently. Fix your indentation and you fix the errors.

I answered your question ages ago, the issue is that you indented inconsistently. Fix the indentation.

Since Robert isn't really being all that helpful as to where it needs to be fixed...

The lines 12 to 28 needs to be un-indented once (select the lines and hit Shift-Tab). Then do it again with lines 14 to 28. And do it yet again with lines 16 to 28. Then do it one last time with lines 17 to 28.

For the first fix, your error was that you had indented twice instead of just once. Probably just a typo.

The second fix is more an assumption than anything else. This is, of course, assuming that you want a Poochyena to spawn if the usr variable Wild isn't 1. Any following "if"s need to be on the same indentation line as the first.

As for the third and fourth fixes, using procs like New() or locate() do NOT need any sort of indentation after them. There, you're simply confusing the system.
I do agree with RobertBanks but I hope you noticed that little box that has "Forum Search" over it. This question has been asked so many times that it's just becoming clutter if anything.

EDIT: Hell even without your post "Inconsistent Indentation" has been mentioned hundreds of times.