Jump to content

Help? "nDigits == 0."


Meatwad107

Recommended Posts

How can I make this work? 

<triggered_effect trigger="onSelfHarvestBlock" action="ModifyCVar" cvar="X" operation="add" value="1"/>                 

<triggered_effect trigger="onSelfHarvestBlock" action="SetProgressionLevel" progression_name="perkDancing" level="@X"/>

I get an error: "ERR XML loader: Loading and parsing 'progression.xml' failed
FormatException: Input string was not in the correct format: nDigits == 0."
 

Is this because @X is a floating point and it needs to be an integer? 
I tried various ways and always got "nDigits == 0." error.
level can equal zero, I did that test already.  'level="0".

Link to comment
Share on other sites

USING CUSTOM VARIABLES AND GAME VARIABLES

A custom variable (float) is declared on the target entity whenever you use one.
<triggered_effect trigger="onSelfAimingGunStop" action="ModifyCVar" target="self" cvar="iAmYourNewCVar" operation="set" value="5"/>

When USING a custom variable INSTEAD OF a fixed value you reference it with an "@" instead of a numeric value.
    <passive_effect name="JumpStrength" operation="perc_set" value="@iAmYourNewCVar"/>
    <requirement name="StatCompare" target="self" stat="stamina" operation="GTE" value="@iAmYourNewCVar"/>


GAME VARIABLES are constants (read-only)

A game variable (whatever data type it is) can be USED in requirements / values.
    <passive_effect name="JumpStrength" operation="perc_set" value="#GameTime"/>
    <requirement name="StatCompare" target="self" stat="stamina" operation="GTE" value="#GameTime"/>

OPERATIONS AND CVARS, game variables

cvar : custom variable name. Use whatever you want.
operation [set,setvalue,add,subtract,multiply,divide,randomfloat,randomint] :
value (Float,@cvar,#gameVariable) : Leading with @/# will parse the value of an existing cvar or game variable instead of a number.
value="randomfloat(1,10)" /  value="randomint(1,10)"  this generates a random number to be used in the cvar manipulation.
    <triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="test2" operation="set" value="randomint(1,10)"/>

Is the error you posted the entire error?

Link to comment
Share on other sites

I read that but I read #GameTime as a predefined number, such as  in C++ "Int GameTime = 3;".

I'll try it and see what happens. i actually ignored that # above for that one reason and didn't try it... as GameTime is a redefined number.

Thanks

Didn't work 😞
"2020-10-01T22:13:17 20.622 ERR XML loader: Loading and parsing 'progression.xml' failed
FormatException: Input string was not in the correct format: nDigits == 0."

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...