This may seem like a seemingly simple thing to do, but I haven't had a need to tinker with AMPscript until recently. I'm merely looking up a value in a Data Extension based on a Subscriber ID. Here's what I'd like to achieve:
%%[ VAR @account_id SET @account_id = %%subscriberid%% ]%%<p>Your score is %%=Lookup("Sample Quiz","A1","account_id",@account_id)=%%</p>
Turns out that my personalization string in a variable is invalid AMPscript, which doesn't surprise me. If I hardcode a variable value it works fine:
%%[ VAR @account_id SET @account_id = 1 ]%%<p>Your score is %%=Lookup("Sample Quiz","A1","account_id",@account_id)=%%</p>
What's the correct syntax?