Problem description:

Here I have posted only the relevant statements that yield the error; so ignore the apparent pointlessness of it.

The object named "Blue" should have a specified tag associated with it. I changed this object's tag in the map file from its default value to "grant me access". When the compiler reaches the line marked "Problem" (the 5th line down), it is not recognizing o.tag as a variable. Is this because I am not allowed to access an object's variables, namely tag, from the mob directory, or did I use an improper syntax?

I am using tag because I would like to keep all objects of type "Blue" distinct. In this way, each "Blue" object can store a different password, as opposed to a single password unlocking access to all of them.

Note that this code works perfectly when o.tag is replaced with "grant me access". Also, I have tried creating my own (non-built-in) variables under object and the very same problem occurs. So I doubt that tag is responsible.


mob/player // Defines the player
Bump( o ) // Events to occur if usr bumps into an obj:
if( istype( o, /obj/Blue ) ) // If object "o" is a type of "Blue"...
var/password = input( "What is the password?", "Password" ) as text // Input the password
if( password == o.tag ) // Problem - If the password input is equal to the object's tag...
usr << "Access granted!" // Then do something

Try giving the var o a type so it knows what vars is available.

In response to T3h P3ngu1n
THANKS!!! Problem solved. =)