Do macros not work within class methods?

I have a method defined within a class in an internal library.

Within it I have:

sc_lookup(rs, "select id from tbl");
$val = {rs[0][0]};

I get the error unexpected ‘{’

Does it mean I need to open a raw pdo connection within methods or have I done something else wrong? I have similar code in pure functions within other internal libraries but never had this problem.

I have functions with macros within internal libraries and works fine.
can you show me your fuction?

I also have them in functions, the problem seems to be within functions in classes. I finally went PDO, original commented out in the excerpts below. (So it’s now working without SC macros but would be interesting to know from you still if it works within classes for you):

class TestConversation extends BotMan\BotMan\Messages\Conversations\Conversation {
    ...		

	function __construct () {
        //sc_lookup(rs, "select id from tbl"); // this was replaced with below PDO code to bypass the problem

		$servername = "localhost";
		$username = "myuser";
		$password = "mypassword";

		try {
		  $conn = new PDO("mysql:host=$servername;dbname=mydb", $username, $password);
		  // set the PDO error mode to exception
		  $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
		  //echo "Connected successfully";
		} catch(PDOException $e) {
		  //echo "Connection failed: " . $e->getMessage();
		}
		
		$sth = $conn->prepare("select id from tbl ");
		$sth->execute();

		$result = $sth->fetchAll();
                    ...
    }

Further note: this class is instantiated within a closure in the main SC app, so maybe that’s what adds a further complication for SC system to understand!!!