mob
verb
Encrypt(msg as text)
var/encryption = rand(1,1000000)
en += encryption
passes += msg
usr << "Your code is [encryption]"
Get_Password(msg as text)
if(en.Find(msg))
usr << "Found"
var
en[100]
passes[100]
Though the "Found" message never appears on the screen even though the encryption is in the list. Could someone help me.
Oh and also, how do I change the font colour in a stat panel.
If you'd use that verb and enter a, it would tell you that it is at index 1.
The 'element' argument in Find() is the item you want to find in the list.
As for your code here, it's not finding what you're looking for because the items in the list are numerical and you're searching for text. If you'd change the verb to Get_Password(msg as num) and -then- try it, you'd get the found message you expected.
On side note, Find() should only be used if you need the index of the item you're looking for. Use if(msg in en) instead.
On the note of your statpanel question, BYOND is currently incapable of user-defined colors contained within them. The color BYOND chooses when displaying stat information is what you're stuck with.