ID:140854
 
Code:


Problem description:
there is a problem with my code but i will have to send the whole thing to you the problem is my interface ( i believe) when i click compile run it runs but my player wont move the output is a piece of crap it wont output anything i say here
mob
verb
OOC(t as text)
world << "[usr] says: [t]"
say(t as text)
view() << "[usr] says: [t]"
ssay(t as text,mob/M in world)
view(M) << "[usr] used [M] to say: [t]"
Osay(mob/M in world,t as text)
set name = "Say to certain view"
switch(input("How far away are the people you would like to talk to?", text) in list("5","6","7","8","Cancel"))
if("5")
oview(5)<<"[usr] says: [t]"
return
if("6")
oview(6)<<"[usr] says: [t]"
return
if("7")
oview(7)<<"[usr] says: [t]"
return
if("8")
oview(8)<<"[usr] says: [t]"
return
if("Cancel")
return

it wont output that all it outputs is problems its soo confusing someone please help
please leave a message or something so i can send you my whole file
If you do not use output(), the string you output via << will go to the default output element - which by this post, I assume you did not make any default ones.

And for the Osay, since only the # changes, you can do this for the switch() part:
#define mm(X, L, H) min(max(X, L), H)
// The above works like this: mm(#, lowest # possible, highest # possible). You'll see why soon.

var/dist = input("How far away are the people you would like to talk to?") as num|null // Asks for a # and null = cancel button.
if(!dist) // If someone entered 0 or pressed the cancel button
return
oview(mm(dist, 5, 8))<<"[usr.name] says: [t]"

// The above mm() makes it so the distance value is in the 5-8 range.
// If it is dist = 3, it would be 5, dist = 10 -> 8, dist = 7 -> 7


// If you wanted to send the text to a non-default output element, you would do:
X << output("Text", "Non-Default-Output-Element")