Not being able to add UDT parameters through scripting

Hello

I'm having issues adding parameters to my UDTs through scripting and I'm not quite sure why. The parameter {opcServer} shows up after running the code, but it doesn't show it in italics. It shows up literally as {opcServer} instead of as a parameter. I've attached the code example below.

Thank you!

def createUDTs2():
	udtName = "GarbageUDT"
	parameters = {
	    "nameSpace": "",
	    "siteCode": "",
	    "siteID": "",
	    "number": "",
	    "version": "",
	    "opcServer": ""
	}
	
	provider = "default"
	system.tag.addTag(parentPath="", name=udtName, tagType="UDT_DEF", parameters=parameters)
	
	opcItemPath = "path"
	namespace = "nsu=something;s="
	siteID = "siteID"
	number = "0001"
	tagName = "Milk"
	folderName = "folder"
	opcServer = "OPC"

	attributes = {
        "OPCItemPath": opcItemPath,
        "OPCServer": "{opcServer}"
    }

	system.tag.addTag(
	    parentPath="[default]_types_/GarbageUDT",
	    name=tagName,
	    tagType="OPC",
	    dataType="Float4",
	    attributes=attributes
	)```

Not sure where you're getting system.tag.addTag, but that's not even an available function. (You're not using ChatGPT are you?)

To create tags using scripting you need to use system.tag.configure

Edit: I found that this is a deprecated function, so I would try to stick with the current methods that are supported.