Loyalty errors

Login or register to post comments
Wed, 2007-11-07 22:03
moxydotorg

I'm trying to copy the loyalty type stuff from the planeswalker template into mine.
I copied the the loyalty_image script, everything in the ###Loyalty section, and everything after ###Extra card fields.

Now when I open the template I get the errors:
Parameter input: card has no member 'loyalty cost 1'
in function contains
in function loyalty_image

Then the following warnings:
Warning while reading file c:\Program Files\Magic Set Editor 2\data\hero-fkih-mse-style/style
On line 301: Unexpected key 'loyalty'
On line 313: Unexpected key 'loyalty cost 1'
On line 325: Unexpected key 'loyalty cost 2'
On line 337: Unexpected key 'loyalty cost 3'

Here's the function:

	# Loyalty cost arrows
	loyalty_image := {
		if      contains(input, match: "+") then "loyalty up"
		else if contains(input, match: "-") then "loyalty down"
		else                                     "loyalty naught"
	}

Here's a snippet starting at line 285 (loyalty: is on line 301)

	
	copyright line:
		left: 40
		top : 495
		width: 295
		height: 12
		alignment: center
		z index: 1
		font:
			name: MPlantin
			size: 6
#			color: rgb(255,0,0)
			color: { paintbrush_color() }
	
	
	############################# Loyalty
	loyalty:
		z index: 4
		left:	326
		top:	467
		width:	13.16
		height:	34.63
		alignment: center middle
		font:
			name: MatrixBoldSmallCaps
			size: 16
			weight: bold
			color: rgb(255,255,255)
	loyalty cost 1:
		z index: 4
		left:	32
		top:	342
		width:	13.16
		height:	34.63
		alignment: center middle
		font:
			name: Mplantin
			size: 12
			weight: bold
			color: rgb(255,255,255)
	loyalty cost 2:
		z index: 4
		left:	32
		top:	390
		width:	13.16
		height:	34.63
		alignment: center middle
		font:
			name: Mplantin
			size: 12
			weight: bold
			color: rgb(255,255,255)
	loyalty cost 3:
		z index: 4
		left:	32
		top:	436
		width:	13.16
		height:	34.63
		alignment: center middle
		font:
			name: Mplantin
			size: 12
			weight: bold
			color: rgb(255,255,255)

############################################################## Extra card fields

Can anyone assist?
One more thing that might help, I'm doing this under the vanguard game.

Thu, 2007-11-08 03:16
Pichoro
Pichoro's picture

Yeah, I know what you did wrong.

Fields like loyalty fields have to be defined in both the style file and the game file. That's your mistake; its not in the game file so the program doesn't recognize it in the style file.