Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

how do i add text depending on variable value?

21 hours ago
i hope this is the right space to ask. let me know which other pages to post to if not.

im writing and trying to figure out how to add text to a page depending on a value.

so every player will see the same page but there are specific lines or paragraphs that they will only see if variable=1.

is that even possible here?

ive been trying to use:

%IF variable=1%
...text...
%ENDIF%

But it hasn't worked yet.

Instead, no matter the value of the variable, they see the "%IF..." code on the page and the text that im trying to make only viewable for players with the variable at a value above 0.

Anyone know how to do this correctly?

how do i add text depending on variable value?

21 hours ago
Try checking this article.

how do i add text depending on variable value?

10 hours ago

This might sound simple, but is the page in Source mode? I know, I know, the RTE is awful, but it helps me code a lot easier.

how do i add text depending on variable value?

10 hours ago
the block you are trying will only work in the Page Script, not inline on the page itself. If you want to do this on the page it would be %%Variable%=%1%...text...%%. Inline the If is assumed and no Endif is needed. More examples are in the article Clayfinger linked above.