Member
Join Date: Aug 2014
Posts: 87
|
I'm getting this error message:
Portal 'caSkills' - Candidate field 'acCrSkills' must be text field. Here's the code for that field Code:
<field id="acCrSkills" name="Career Skills" type="derived" defvalue="Skill.skForgery"> </field> |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Read the description for the "maxlength" attribute. That tells you how to change between a value field and a text field.
Based on the defvalue you're setting, why store this information as a field? Why not store it as a tag? |
#2 |
Member
Join Date: Aug 2014
Posts: 87
|
I was on the way to delete this post since I just found that part about non-zero length
I'm trying to build a chooser that only has a small number of skills on it. This is back to my whole 'trying to let careers pick their starting skills' thing. |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
If I were building a chooser that only offered a small number of skills to choose from, I'd create an identity tag group on the skill component to use for this, and then place those identity tags on the career things.
Then, use a script on the Career component to fill in a text field, rather than making whomever's building the careers remember the Ids and write them out manually. Last edited by Mathias; October 14th, 2014 at 08:47 AM. Reason: corrected a typo |
#4 |
Member
Join Date: Aug 2014
Posts: 87
|
Quote:
|
|
#5 |
Member
Join Date: Aug 2014
Posts: 87
|
I'm having a bit of problem here. I can get my identity tag on the Career container, but I can't get the NEEDTAG part to reference it. It's saying nothing's found, but I can right-click and have it show the tags and see there are tags for CareerSkl1.
From the Career Code:
<!-- Tag all the skills that this career can choose from--> <tag group="CareerSkl1" tag="skPistol"/> <tag group="CareerSkl1" tag="skHandW"/> Code:
<portal id="crSkPick1" style="chsNormal"> <chooser_table component="Skill" choosetemplate="LargeItem"> <needtag container="Career" thing="CareerSkl1"></needtag> <chosen><![CDATA[ if (@ispick = 0) then @text = "{text clrwarning}Select Skill" else @text = field[name].text endif ]]></chosen> <titlebar><![CDATA[ @text = "Choose the Skill for your career" ]]></titlebar> </chooser_table> </portal> |
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
This portal's container is the hero, not the career, so you'll need to copy the tags from the career to the hero before needtag can be used.
|
#7 |
Member
Join Date: Aug 2014
Posts: 87
|
hmmm. then I might have an issue. There are multiple careers, each with their own selections. The chooser_table would need to be unique to that career. Or at least have its options unique to that career.
Last edited by barrelv; October 14th, 2014 at 12:22 PM. Reason: clarity |
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In that case, needtag isn't going to be an option in this case. You'll need candidate expressions.
|
#9 |
Member
Join Date: Aug 2014
Posts: 87
|
Going in circles
so this is where I started today, but I ran into errors. Those errors eventually led me to Needtag. Are there any examples of using Candidates? |
#10 |
|
|