ID:838751
 
Code:
obj
Topic(href, href_list)
..()
switch(href_list["choice"])


Problem description:
im using Topic and \ref to get choices in the html

i want to make it so i enter a password and if its equal to the current password it will let you in but it keeps saying "expecting constant expression"
how might i get pass this/
am i going the wrong way with this using Topic?/
and if so how might i use javascript to check?

and finally: how might i change dreammaker vars in html/javascript?


You're misusing switch(). All you need in this case is a simple if(a == b) condition.
if(password_given == password)
world << "You gain access to [src]!"

As for the actual HTML part, I can't really help you there.
awww ok well thanks for your help :o
ok from what you told me and what i found out by re-reading the reference about 20 times i got it now i just need to know how to send the input through Topic()

like

<form>
password:<input type="password" name="password"/>
<input type="submit" value="Log in"/>
</form>

i need to send the value of password to the objects Topic() if anyone thats experienced in javascript/html can help me that would be very helpful :)
You need to pass a hidden "src" parameter with the form.

<input type="hidden" name="src" value="\ref[src]">
EDIT:that last comment was dumb as crap

but can you explain how putting hidden there will send the value of password
That itself won't send the value of the password. I suggest looking up how HTML forms work. Basically you add that hidden input element to the <form> and it will pass another value through the system when the form gets submitted.
Specifically client/Topic(). Take a look at the second example.