var/a = input("Select a arena to play in","Arena Selection") in list ("Capture The Flag","Elimination")
switch(a)
if("Capture The Flag")
world << "[src] has joined Capture The Flag."
if("Elimination")
world << "[src] has joined Elimination."
var/t = input("Choose a side.","Your Team?") in list ("Blue","Red")
switch(t)
if("Blue")
icon = 'blue.dmi'
src.loc = locate(/area/login)
if("Red")
icon = 'red.dmi'
src.loc = locate(/area/rlogin)
I am trying to allow a player, once a arena is choosen, to select their color. But since the different arenas are in different spots I need to be able to have switches inside the switches.. This possible?
I get these errors:
paintball.dm:35:error:= :expected "if" or "else"
paintball.dm:36:error:= :expected code block
paintball.dm:36:src.loc:warning: statement has no effect
paintball.dm:36::warning: operation has no effect here
I was also wondering what to use just to make a player join the team with least people? Thanx for any help on either of these.
ID:150581
Aug 25 2001, 4:05 pm
|
|
In response to Oblivian
|
|
Oblivian wrote:
switch(t) Use an if. Like everything else.. if(teamred.players <= teamblue.players) That won't work, though. Something like that. |
In response to Vortezz
|
|
Vortezz wrote:
Oblivian wrote: > if(teamred.players <= teamblue.players) That won't work, though. Something like that. Ok Thanx :) |
I fixed the indentation lol, stupid me.
Would someone help me with this though?