ID:167270
Apr 7 2006, 12:15 pm
|
|
I have a big ol' list of songs for my game but how do i make it so there is an actual list so when I select a certain song it plays it
|
Apr 7 2006, 12:27 pm
|
|
well you could do it in a input like so:
|
In response to National Guardsmen
|
|
oh thx but instead of if what if you put else if or would that not work
|
In response to Mxjerrett
|
|
there is no use for else in that.
|
In response to National Guardsmen
|
|
whats wrong with this
Play() |
In response to Mxjerrett
|
|
Mxjerrett wrote:
whats wrong with this > Play() you need to indent the ifs 2 times to were its like so mob/verb/Play() and there is no need to if cancel the switch takes care of it by make it return when choose. if i am wrong some one plese correct me. |
In response to National Guardsmen
|
|
i still get the same error
|
In response to Mxjerrett
|
|
post the errors plese kinda hard to fix with out them even so i told you what to fix in my post above.
|
In response to National Guardsmen
|
|
code files\admin.dm:79:error: if: missing comma ',' or right-paren ')'
|
In response to Mxjerrett
|
|
ahh i see what i forgot sorry,
mob/verb/Play() note the extra ) i added to the input |
In response to National Guardsmen
|
|
It'd be better to keep an associative list.
var/list/songs=list("Pokemon Song"='ps.wav',"DBZ Intro"='DBZ.wav') |
In response to Artemio
|
|
hmm i never thought of doing it that way. and i didnt know you could use = inside of a list.
|
In response to National Guardsmen
|
|
um now it says code files\admin.dm:78:error: missing left-hand argument to in.
|