Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

ScriptCards t- Token Error

1705533805

Edited 1705533820
Essen
Pro
Marketplace Creator
Hi there. I am calling for the Bar 1 value using --=Var|@{target|t-bar1_value} It works, but I'm also getting this error in the chat No attribute was found for @{TARGET:target|t-bar1_value} No error in the console, just the chat. Anything I need to do differently?
1705536392

Edited 1705536534
For  ScriptCards Object Attribute Referencing  for token properties they are typically used with [*T:t- or [*S:t- or occasionally with the TokenID itself [*[&tokenIDvariable]:t-]. So typically at the top of my scriptcard I will do something like: --#sourceToken|@{selected|token_id} --#targetToken|@{target|token_id} then you can use [*S: and [*T: respectively to access their character attributes and token properties. So in the above example you could have: --#targetToken|@{target|token_id} --&Var|[*T:t-bar1_value] EDIT: One thing I should add is that the way Roll20 processes things. All @{} references, all ?{} references, and all %{} references are processed before the ScriptCard processes things. So you can use @ or ? to get information and set variables but ScriptCard specific things like using t- to get token properties is not going to work.
1705592504
Essen
Pro
Marketplace Creator
Alrighty! That worked, though I still don't 100% understand why the @{} error was adding in TARGET:  to the front. 
1705761687
Kurt J.
Pro
API Scripter
Essen said: Alrighty! That worked, though I still don't 100% understand why the @{} error was adding in TARGET:  to the front.  Because the Roll20 chat server parses any @{...} referenced before handing anything off to the API, and it doesn't know what "t-bar1_value" is because that is a syntax particular to ScriptCards.