View Single Post
Sevisin
Member
 
Join Date: Oct 2013
Posts: 79

Old August 12th, 2017, 12:09 PM
Thank you all for the replies. However, I am still having problems with this simple matter.

01.jpg shows the hero tags for a single level of the class
02.jpg shows the simple if statement used
03.jpg shows the error after compile/test

The code below is code I used that worked, but would CRASH THE PROGRAM after compiling. After I reload the program, the class would work normally. Not sure why.

Code:
      var level as number
      var total as number

      level = field[xTotalLev].value

      if (level >= 4) then
        field[livename].text = "Body of Nature rank 2, +2 Natural Armor, Resistance 10 Cold/Electricity"
	total = 2
      elseif (level >= 2) then
        field[livename].text = "Body of Nature rank 1, +1 Natural Armor, Resistance 5 Cold/Electricity"
	total = 1
      endif

     ~ Note: This power increases our natural armor, it doesn't just add a nonstackable bonus.
      hero.child[mNatural].field[Bonus].value = hero.child[mNatural].field[Bonus].value + total
      field[livename].text = field[livename].text & total
The goal of this code is to overwrite and update the natural AC given by Landforged Body, as well as the text for the special ability at given levels. Above code was recycled from class special cDDiArmor1 (or was it cFMaNatAr1? I don't remember).

Any help is appreciated.

Thanks,

-S
Attached Images
File Type: jpg Landforged Walker problem 01.jpg (224.1 KB, 4 views)
File Type: jpg Landforged Walker problem 02.jpg (140.5 KB, 5 views)
File Type: jpg Landforged Walker problem 03.jpg (79.6 KB, 2 views)
Sevisin is offline   #5 Reply With Quote