Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
Line one should be var agile as number, not as A number. Also, if you're setting bonus=agile then why not just use "agile" instead by just deleting that line and using agile in your final line? And who know, maybe it's got an issue with a variable named "bonus", or something (maybe it's used elsewhere and is confusing things?)
Lenny Zimmermann Metairie, LA, USA Data files authored (please let me know if you see any issues with any of these if you have/use them): Official (In the downloader) 50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome Coming Eventually Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me) |
#21 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,550
|
Try this:
Code:
var bonus as number bonus = 0 if (#trait[attrAgi] > 7) then bonus = 6 + int(((#trait[attrAgi]-6)/2)) else bonus = #trait[attrAgi] endif perform #traitadjust[trTough,+,bonus,"Thin Man"] _ Currently In Development: Savage Pathfinder, SWADE Fantasy Companion Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
#22 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
I thought "agile" was pointless, but since I wasn't getting any result, I figured I'd try it someone else's way. I'll give your version a try in a few minutes, CC.
|
#23 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
Nope.
Syntax error on line 5, according to the test: "error parsing parameter 1 of function". |
#24 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
Hmmm. This finally mostly works (it produces the right number but doesn't care whether the selection toggle is on or not).
Code:
var bonus as number bonus = 0 bonus = #trait[attrAgi] if (bonus >= 6) then bonus = 6 + round(hero.child[attrAgi].field[trtRoll].value / 2,0,-1) endif perform #traitadjust[trTough,+,bonus,"Thin Man"] Last edited by Paragon; August 26th, 2014 at 02:35 PM. |
#25 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
I was naughty and put "a" in the middle.
OK, I tested this and it works Traits 5000 Quote:
Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
|
#26 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
As in, that will let you toggle it on and off with the "Selected" option?
|
#27 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,550
|
OK, correction:
Code:
var bonus as number var agile as number bonus = 0 if (#trait[attrAgi] > 7) then agile = #trait[attrAgi] bonus = 6 + int(((agile-6)/2)) else bonus = #trait[attrAgi] endif perform #traitadjust[trTough,+,bonus,"Thin Man"] _ Currently In Development: Savage Pathfinder, SWADE Fantasy Companion Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
#28 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
This version seems to not like line 7. Same "error parsing parameter of function 1". Maybe that baroque business in the core version actually serves some kind of purpose?
Of course the one I hacked together works anyway, other than the toggle. |
#29 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
By the by, in an unrelated question, anyone know why when I'm using the "creature" object in the test portfolio, I keep getting a validation error saying "Human: This selection not permitted (all effects are ignored)." ?
|
#30 |
|
|