Code:
mob
Move()
..()
sleep(05)
Problem:
The user doesn't move...at all...
Contacting Admins Question
Code:
mob/verb
ContactAdmin()
input("Please only use this as a last resort!","Continue?","Back")in list("Continue","Back")
if("Continue")
var/tmp/question = input("Enter question:")
for(var/mob/M in admins)
M << "<font color=yellow>QUESTION\nKEY:[usr.key]\nNAME:[usr.name]\n[question]"
if("Back")
return
Problem:
1) Even when they select "Back" it still asks them to enter their question.
2) It doesn't send the message to any admin...
Please help! Thanks!!
Check to see that you don't override Move() elsewhere. Also, get rid of the 0 in front of your 5, and get out of the habit of prefixing numbers with zeros. This is interpreted in the compiler as an octal number, meaning:
input() returns a value. You don't do anything to store that value anywhere.
if(x) tests if x evaluates to a true value (not null, zero, empty string) and, if so, executes its corresponding block of code. Here, x would be your "Continue" string which is neither null, zero, or an empty string, and so the block of code belonging to it will always be executed. Incidentally, this also applies to if("Back").
If you want to test the result of input(), you should store its return value in a variable and test against that. If you have further questions, read the DM Guide.