If I'm following this correctly, I think the condition should be:
PHP Code:
// access permissions
if ((!is_member_of($vbulletin->userinfo, 5, 6, 7)) AND ((!isset($age)) OR ($age == '$nbsp;') OR ($age < 18)))
{
// give no permission unless in usergroup x, y, or z
print_no_permission();
}
I'm assuming that if age isn't set or it's set to nbsp that the user won't have permission.