ID:143145
 
Code:
world
name = "Star Wars Jedi Temple"
status = "version 5.0"


new()

proc
CreateChar()
var inp=(input("Which race would you like to be?") in list, ("Human","Cerean","Twi-Lek","Wookie"))
inp = usr.icon
switch(input("Which race would you like to be?") in list, ("Human","Cerean","Twi-Lek","Wookie"))
if("Human")
switch(input("Which color skin would you like?") in list ("Black","White"))
if("Black")
usr.icon = 'Icons.dmi'
usr.icon_state = "b_human"
if("White")
usr.icon = 'Icons.dmi'
usr.icon_state = "w_human"
if("Cerean")
usr.icon = 'Icons.dmi'
usr.icon_state = "w_cerean"
if("Twi-Lek")
switch(input("Which color skin would you like?") in list ("Blue","Red","Green"))
if("Blue")
usr.icon = 'Icons.dmi'
usr.icon_state = "b_twilek"
if("Red")
usr.icon = 'Icons.dmi'
usr.icon_state = "r_twilek"
if("Green")
usr.icon = 'Icons.dmi'
usr.icon_state = "g_twilek"
if("Wookie")
switch(input("Which color fur would you like?") in list ("White","Brown","Dark Brown"))
if("White")
usr.icon = 'Icons.dmi'
usr.icon_state = "w_wookie"
if("Brown")
usr.icon = 'Icons.dmi'
usr.icon_state = "b_wookie"
if("Dark Brown")
usr.icon = 'Icons.dmi'
usr.icon_state = "db_wookie"


Problem description:

Well before I state my problems/questions i'll explain myself. I use the "Noob" coding way because its easier to read.. i'm able to fully understand the other way of writing the code but I prefer the "Noob" way.

I'm resurrecting the star wars genre on byond because I noticed noone has any running games on there and that sucks because I like star wars.

The name of my game is Star Wars Jedi Temple ((Couldent really think of a name so I was blunt.)) Basicly a Jedi academy where you start out a Initiate, Get trained by Jedi Trainers, Also can learn from holocrons, And when your Padawan rank you can be accepted by a master to further your rank.

but enough about that.. On to the questions/problems!

I recently learned about the switch(input) command and decided to use it on my game instead of having computers in the game that change your icon etc.

I'm trying to have it so if your a new member you can choose your race icon in the beginning but so far I havent been very sucessfull. I'm not too sure where to put this code I could have it under the Login() Proc but that would make it so everytime you log on you can change your race O.o.

I could have it under a verb but thats kind of weird so I decided to try and make a proc.. I usually dont make procs so I wasent sure where to put it so I put it under the World scripts.

then under New() because it seemed to hate it when I just had my proc under the world scripts.

and now it wont leave me alone about that piece of code i'll write all the errors I recieve:

World.dm:6:error::empty type name (indentation error?)
World.dm:6:error:new :instruction not allowed here
World.dm:10:error:list:undefined var
World.dm:12:error:list:undefined var
World.dm:10:error::invalid expression
World.dm:12:error:switch :extra args
World.dm:10:inp :warning: variable defined but not used
World.dm:8:error::empty type name (indentation error?)

((cencored)).dmb - 7 errors, 1 warning (double-click on an error to jump to it)



If anyone can help that would be great.

EDIT: Oh and I registered a hub for this game but when I host a game it wont show up that there is a live game. Is there a special code I need in order to have it show on the hub?
world
name = "Star Wars Jedi Temple"
hub = "Type hub path here."
hub_password = "Type the hub password here."
status = "version 5.0"


mob
proc
CreateChar()
switch(input("Which race would you like to be?","Race")in list("Human","Cerean","Twi-Lek","Wookie"))
if("Human")
switch(input("Which color skin would you like?") in list ("Black","White"))
if("Black")
usr.icon = 'Icons.dmi'
usr.icon_state = "b_human"
if("White")
usr.icon = 'Icons.dmi'
usr.icon_state = "w_human"
if("Cerean")
usr.icon = 'Icons.dmi'
usr.icon_state = "w_cerean"
if("Twi-Lek")
switch(input("Which color skin would you like?") in list ("Blue","Red","Green"))
if("Blue")
usr.icon = 'Icons.dmi'
usr.icon_state = "b_twilek"
if("Red")
usr.icon = 'Icons.dmi'
usr.icon_state = "r_twilek"
if("Green")
usr.icon = 'Icons.dmi'
usr.icon_state = "g_twilek"
if("Wookie")
switch(input("Which color fur would you like?") in list ("White","Brown","Dark Brown"))
if("White")
usr.icon = 'Icons.dmi'
usr.icon_state = "w_wookie"
if("Brown")
usr.icon = 'Icons.dmi'
usr.icon_state = "b_wookie"
if("Dark Brown")
usr.icon = 'Icons.dmi'
usr.icon_state = "db_wookie"


There you go.
In response to Howey
Thank you very much :D I cant remember how to call a proc dont I just type CreateChar() or do I type something like Call CreateChar()?

<Font Color="Red">EDIT:</Font> Nevermind I figured it out, Now my only problem is that even tho I put in the new commands that should make my game show up on it's hub its still not working >.<.
In response to Brejik
world/hub="Brejik.swjt"

thats what your looking for.

*cough*edit*cough*
In response to Tubutas
That is not detailed enough nor is it correct. It would be best to describe in some detail or link them so such a page where they can understand somewhat more of what to do.

http://members.byond.com/ BYONDHelp?command=view_post&post=33278
In response to GhostAnime
oh, my bad >.>