NuiChartSlot( int, json, json, json )
From NWN Lexicon
Jump to navigationJump to search
json // NuiChartSlot
NuiChartSlot(
int nType, // Int:NUI_CHART_TYPE_*
json jLegend, // Bind:String
json jColor, // Bind:NuiColor
json jData // Bind:Float[]
);
Returns
jons Element
Parameters
- nType
- NUI_CHART_TYPE_*
- jLegend
- Can be either a JsonString or NuiBind (don't get it confused with NWN string).
- jColor
- NuiColor
- jData
- JsonArray of JsonFloats
Description
json NuiChartSlot
Remarks
Known Bugs
Passing in incorrect json data or empty json array to NuiChartSlot data may crash the game client.
// NuiColor is nonsensible in this context. Don't do this.
NuiSetBind(oPlayer, nToken, "data_bind_name", NuiColor(255, 255, 255, 0));
json jData = JsonArray();
// Array is not populated. Don't do this.
NuiSetBind(oPlayer, nToken, "data_bind_name", jData);
Use something like JsonGetLength :
if (JsonGetLength(jData) > 0)
{
NuiSetBind(oPlayer, nToken, "data_bind_name", jData);
}
Version
This function was added in 1.85.8193.31 of NWN:EE.
Example
See NuiChart#Example
See Also
| functions: |