ID:263574
 
Tournament
set category = "Channels"
HostTourn
switch(alert("Are you sure you want to host a tournment.","Yes","No"))
if("Yes")
var/Name=input("What are you going to name the tournament")as text
var/People=input("How many people u want?")in list("4","8","15")
world<<"[src] is hosting a ([Name])tournament and([People]) is need."
if("No")
return


I think its ok but of cource its not. It keeps saying Inconsistent indentation. but i dont know what that is? Plz help me thanks
post it in dm tags
Ok, this would be probably a better example. Abd it really would, also help you if you ended your HTML tags, too!

mob/verb
Tournament
set category = "Channels"
switch(alert("Host a tournament?","Tournament","Yeah!","I'll pass.."))

if("Yeah!")
var/tname = input("What name for your Tournament?","Tournament") as null|text
if(!tname)
src << "Please, use an actual name!"
return
var/players = input("How, many players do you want to compete?","Tournament") as null|num
if(!players)
return
if(players > 8)
src << "Only <b>8</b> players can compete!"
return
world << "<font color=red>WORLD EVENT!: [src] is hosting <b>[tname]</b> and only <i>[players] Players</i> can compete!</font>" //Please, end all HTML tags!!
In response to Quest Industries
Quest Industries wrote:
Ok, this would be probably a better example. Abd it really would, also help you if you ended your HTML tags, too!

mob/Admin
verb
Tournament()
//set category = "Tournament"
switch(input("Host a tournament?","Tournament") in list ("Yes","No"))
if("Yes")
var/tname = input("What name for your tournament","Tournament") as null|text
if(!tname) {src << "Please, use an actual name!";return tname}
var/players = input("How, many players do you want to compete?","Tournament") as null|num
if(!players) {src<<"No player amount entered";return players}
else if(players > 8) {src<<"Only below an amount of 8 players can compete!";return players}
world << "<font color=red>WORLD EVENT!: [src] is hosting <b>[tname]</b> and only <i>[players] Players</i> can compete!</font>"
>


You can't have the verb without the brackets
In response to Upinflames
umm, why its [src] hosting turnament?
shoudnt it be [usr]?
In response to Duni
either one is fine.
In response to Duni
Duni wrote:
umm, why its [src] hosting turnament?
shoudnt it be [usr]?

I prefer not using usr all the time. And this is also a verb not a mob or obj so it would'nt say like 'Sword' is hosting a tournament.
In response to Quest Industries
Here also made it an admin verb so like you and other Admins in the game can use it.

mob/Admin
verb
Tournament()
//set category = "Tournament"
switch(input("Host a tournament?","Tournament") in list ("Yes","No"))
if("Yes")
var/tname = input("What name for your tournament","Tournament") as null|text
if(!tname) {src << "Please, use an actual name!";return tname}
var/players = input("How, many players do you want to compete?","Tournament") as null|num
if(!players) {src<<"No player amount entered";return players}
else if(players > 8) {src<<"Upto an amount of 8 players can compete!";return players}
world << "<font color=red>WORLD EVENT!: [src] is hosting <b>[tname]</b> and only <i>[players] Players</i> can compete!</font>"
else if ("No") return 0
Oh man dude... I could make a fully automated bug free tournament SO much better than the examples I see below... But unfortunately for you Im too busy right now and dont want to either... I might do it later though so ya might want to check back, or not, or I might not come back, or I could kill you, either one, you dont really have a choice, its my universe and you have no control.

[EDIT] Im going to be rich very soon...
In response to Dragonn
Dragonn wrote:
Oh man dude... I could make a fully automated bug free tournament SO much better than the examples I see below... But unfortunately for you Im too busy right now and dont want to either... I might do it later though so ya might want to check back, or not, or I might not come back, or I could kill you, either one, you dont really have a choice, its my universe and you have no control.

[EDIT] Im going to be rich very soon...

Ok.. have fun with that. And, the thing is, those were ONLY examples, to help someone with.
In response to Quest Industries
Thanks for your help guys