turf
TitleScreens
density=1
MainTitle
icon='gamescreen.png'
NewButton
Click()
if(fexists("Players/[usr.key].sav"))
if(alert("You already have a character. /nCreate a new one anyway?","File Detected","New","Cancel")!="New")
return
usr.loc=locate(17,5,2)
LoadButton
Click()
if(usr.Load())
world << "[src] has logged in."
else
alert(usr,"You don't have a character!","Load error")
CharSelect
icon='clanchoose.png'
ClanButton
name="Clan1"
Click()
src.name = input("What is your character's name?",src.name)
switch(input("Do you choose this clan?")in list("Yes","No"))
if("Yes")
switch(rand(1,100))
if(100)
usr.loc=locate(5,5,3)
else
return 0
world << "[src] has joined Clan1!"
usr.loc=locate(1,200,1)
usr.Clan = "Clan1"
usr.Class="Warrior"
if("No")
return 0
Problem description:
I'm trying to make it so that there is a 1/100 random chance someone will be located to a certain part of a map when they start a new game (the random code I used is near the bottom of the entire code above). I'm not sure exactly how I'm supposed to put the code as, though. When I compile, it keeps saying "Inconsistent Indentation" when I do it this way, and if I try fixing the identation, it tells me something like 'expected "if" or "else"'.
Looks like you have a space on the if right after your switch statement, that would be your inconsistent indentation.