So... I'm trying to use a grid cell's value to store variables. Here's the code:
on run do
if Data.cell(0,0)=1 & ("room" = "%l" format me.text)
Log.text:Log.text,"\n\n","> ",me.text,"\n","You are in room 1."
elseif Data.cell(1,0)=1 & ("room" = "%l" format me.text)
Log.text:Log.text,"\n\n","> ",me.text,"\n","You are in room 2."
elseif Data.cell(2,0)=1 & ("room" = "%l" format me.text)
Log.text:Log.text,"\n\n","> ",me.text,"\n","You are in room 3."
elseif Data.cell(3,0)=1 & ("room" = "%l" format me.text)
Log.text:Log.text,"\n\n","> ",me.text,"\n","You are in room 4."
else
Log.text:Log.text,"\n\n","> ",me.text,"\n","I do not understand."
end
And the Grid value is
Rooms 0 0 0 0
Which should produce "I don't understand" but it says, "You are in Room 1." No matter how I format the grid itself.
Am I doing something wrong?