Loading ...
Sorry, an error occurred while loading the content.
 

Accessing value of a text field

Expand Messages
  • Scott Stewart
    I am trying to write a function that determines the cost of a skill depending upon the value of the Profession of the character. I have a text field that
    Message 1 of 1 , Jul 1, 2000
      I am trying to write a function that determines the cost of a skill
      depending upon the value of the Profession of the character.

      I have a text field that contains the value of profession. This is
      defined as:
      edittext "" 465 4 64 17 PROF

      In my skill item, I have the Professions defined as categories.
      For Example:
      item Negotion cat Diplomat;Skill class Pers formula skillcost(x,3)
      level 1 cost 3.000000 totalcost 3.000000 end

      Now in the skillcost function I am trying to get the value of the
      PROF
      text field, and use it to determine if the item is in the category
      that
      matches the value. I.E.
      func skillcost(level,lvlcost) "{
      local cost,acost;
      rcost = lvlcost;
      if (inCategory(PROF))
      acost = acost - 1;
      endif
      cost = acost * level;
      return cost;
      }
      "

      The problem is that the inCategory function never returns true. I
      have
      tried to also define other functions just to display the value of
      PROF
      and always get zero.

      dialogFieldValue(Char, PROF)
      PROF
      format("%s",PROF)

      Nothing appears to work.

      What am I doing wrong?
    Your message has been successfully submitted and would be delivered to recipients shortly.