0 votes
by (460 points)

Hi,

I want to implement a system point as bellow :

You have <span id="#value-point"><<print $Assign_Point>></span>  points to assign to your stats :

Social    : <span id="stats-Soc"><<print $Social>></span>     <<link "[+]">><<set $Social++; $Assign_Point-->><<replace "#stats-Soc">><<print $Social>><</replace>><<replace "#value-point">><<print $Assign_Point>><</replace>><</link>>/<<link "[-]">><<set $Social--; $Assign_Point++>><<replace "#stats-Soc">><<print $Social>><</replace>><<replace "#value-point">><<print $Assign_Point>><</replace>><</link>>

The problem is that

<<replace>>: no elements matched the selector "#value-point".


Thanks.

 

P.S. : I would like to make a max point to allocate (max 5) ? (Maybe it's easy but as there is a problem first ^^).

1 Answer

0 votes
by (63.1k points)

You've added a hash mark (#) to the id attribute of your points <span>, and you don't want to do that—ID selectors use the hash, the id attribute does not.

 

In other words, this:

You have <span id="#value-point"><<print $Assign_Point>></span>  points to assign to your stats :

Should be this:

You have <span id="value-point"><<print $Assign_Point>></span>  points to assign to your stats :

 

PS: You also don't need to use the <<print>> there, due to the naked variable markup.

...