ID:261600
 
ob
Login()
if(redtaken==0 || blacktaken==0)
goto team
..()
Stat()
statpanel("Playing")
stat("Red:",red)
stat("Black:",black)
team
switch(input("Which side would you like to be on?")in list("Red","Black"))
if("Red")
if(redtaken!=1)
red=src
redtaken=1
else
src<<"Red is already taken"
Login()
if("Black")
if(blacktaken==0)
black=src
blacktaken=1
else
src<<"Black is already taken"
Login()

From that I get like 33 errors. It's all in the part after the "team" label.
What are the first three errors?
The reason you get so many errors is that the block of code you have under the label is outside any proc. Can't do that. The label is useful when you want to jump to a block of code within the same proc. However, using labels and goto statements is generally a bad idea - it's an easy way to get really messy, convoluted code that never works quite right or is a nightmare to update. Here's my suggestion for how to do what you wanted:

mob
Login()
var/chosen = 0
while ((!redtaken || !blacktaken) && !chosen)
switch(input("Which side would you like to be on?")in list("Red","Black"))
if("Red")
if(!redtaken)
red = src
redtaken = 1
chosen = 1
else
src << "Red is already taken"
if("Black")
if (!blacktaken)
black = src
blacktaken = 1
chosen = 1
else
src << "Black is already taken"

This will continuously loop until either the player has chosen a valid team, or both teams have been chosen by other players.

Ultimately you probably want to make it more flexible - rather than hard coding the sides into the switch statement, you could use a list of side names and corresponding associative lists of who is on what side. But that's a whole other ball of wax. ;-)
In response to Air Mapster
I like wax... it tastes good...
You're using labels very wrongly here--and you shouldn't be using a goto in this case no matter what, anyway. The correct way to do this is to create a proc with your code in it, and call that.

First thing you're doing wrong: You're trying to jump out of one proc and into another using goto. Goto doesn't work like that.

Second thing you're doing wrong: As mentioned, your label isn't inside a proc. It's being interpreted as a datum, therefore, so the switch() statement is instantly seen as an error.

Third thing you're doing wrong: You're using goto in the first place. There are, I feel, appropriate times for it to be used, but this isn't remotely one of them.

Lummox JR