ID:262512
 
Code:
    join
icon = 'join.bmp'
density = 1
Click()
switch(input("What team do you want to be on?", "Team Selection", text) in list ("Super Heros","Aliens"))
if("Super Heros")
Check_Heros()
if("Aliens")
Check_Aliens()



mob
proc
Check_Heros()
var/mob/M
for(M as mob in world)
if(M.player1==0)
usr.class="Hero"
usr<<"You are now player 1. You have the ablility to start the game when ever you want."
world<<"[usr] is player 1 and can start the game when ever he/she wants."
M.player1=1
usr.icon = 'Player1.dmi'
if(M.player1==1)
if(M.player3==0)
usr.class="Hero"
usr<<"You are a player 3 hero."
M.player3 = 1
usr.icon = 'Player3.dmi'
if(M.player3==1)
if(M.player5==0)
usr.class="Hero"
usr<<"You are a player 5 hero."
M.player5 = 1
usr.icon = 'Player5.dmi'
if(M.player5==1)
if(M.player7==0)
usr.class="Hero"
usr<<"You are a player 7 hero."
M.player7 = 1
usr.icon = 'Player7.dmi'
if(M.player7==1)
usr<<"The hero player slots are full."


Problem description:
I also made the proc for Check_Aliens() but it is pretty much the same thing as the Check Heros. Well the problem is that every time I am trying to complie DM the error comes up as:
loading War with Aliens.dme
Main.dm:44:error:Check_Heros:undefined proc
Main.dm:46:error:Check_Aliens:undefined proc

War with Aliens.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)

I thought I coded everything in right I checked it over but I might of read over something on accident because I have to go somewhere soon so I got to hurry up. I will check the forums when I come back. This code is for my new game and I am trying to make it so if you click join you pick what class you want to be and the proc is suppose to check to see if players are already in the player slot if there is someone then it checks the next player and goes on till it says that there are no open slots. Thanks for your time.

->Calus CoRPS<-
  join
icon = 'join.bmp'
density = 1
Click()
switch(input("What team do you want to be on?", "Team Selection", text) in list ("Super Heros","Aliens"))
if("Super Heros")
src.Check_Heros()
if("Aliens")
src.Check_Aliens()
In response to Cheetoz
Wow that was fast, but the same error come up again. Well I got to go so please still reply I will reply when I come back.
[edit]I found the problem instead of putting src I put usr and it work fine. Thanks still.

->Calus CoRPS<-
Simple as hell.
    join
icon = 'join.bmp'
density = 1
Click()
switch(input("What team do you want to be on?", "Team Selection", text) in list ("Super Heros","Aliens"))
if("Super Heros")
usr.Check_Heros()
if("Aliens")
usr.Check_Aliens()



By the way, I'm half asleep, so i'm not going in great detail into it... that way will work... you can upgrade it as needed later...
In response to Hiddeknight
Tons... and tons... and more tons of usr abuse :/