There isn't a syntax error in the table.cell line itself, but there's a discrepancy between the comment and the actual table position.
Your original snippet had this:
pinescript
// === Display License Status at Bottom-Left ===
var table licenseTable = table.new(position.top_center, 1, 1, border_width=0)
Notice how the comment says Bottom-Left, but the code position.top_center places it at the top-center. My previous merged code inherited this.
If you intended for the table to appear at the bottom-left of the chart, you need to change position.top_center to position.bottom_left in the table.new function call.
Here's the corrected code with the table positioned at the bottom-left, matching the likely intent from your comment:
pinescript
// === License Settings and Authorization ===
userCode = input.string("", title="Enter Code") // user input
correctCode = "bth4.3.3" // updated license code
expiryDate = timestamp(2025, 7, 23, 14, 00) // Expiry (YYYY, MM, DD, HH, MM in UTC)
isNotExpired = time < expiryDate // Check if current time is before expiry
isAuthorized = (userCode == correctCode) and isNotExpired // Validate code and expiry
// === Display License Status at Bottom-Left ===
var table licenseTable = table.new(position.bottom_left, 1, 1, border_width=0) // Changed position here!
// Message based on authorization status
msg = isAuthorized ? "✔️ Licensed: Beginner Trader Helper\n📅 Expiry: 23 Jul 2025" :
(userCode != "" ? "❌ Invalid or Expired License" : "")
table.cell(
licenseTable, 0, 0, msg,
text_color = color.white,
bgcolor = isAuthorized ? color.new(color.green, 70) : color.new(color.red, 70),
text_size = size.small
)
Correction Made:position.top_center was changed to position.bottom_left in the table.new call.