Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Can't get $LINKTEXT to work, little help, please?

9 years ago
I've tried to use in link scripts and page scripts, but to no avail...

I have a link that, based on the values of two variables, cause the link to direct the reader to four different pages. This works fine, but I'd like to change the link's text to reflect the destination.

IF %FIRST=0 AND %SECOND=0 THEN $LINKTEXT01 := "Page One..."
IF %FIRST=0 AND %SECOND=1 THEN $LINKTEXT01 := "Page Two..."

etc...

What am I doing wrong?

Can't get $LINKTEXT to work, little help, please?

9 years ago

Just use two links. 

Can't get $LINKTEXT to work, little help, please?

9 years ago
I don't want the reader to know that the other pages even exist, and the boolean values are records of other page visits. I could use four different links and make the other three hidden?, but I'm still getting used to scripting and haven't learned how...yet...

Can't get $LINKTEXT to work, little help, please?

9 years ago

Just use the link restrictions. It look like a stop sign next to the link if you have the advance editor on. 

Can't get $LINKTEXT to work, little help, please?

9 years ago

Put it in pagescript and use $LINKTEXT1 instead of $LINKTEXT01. 

Can't get $LINKTEXT to work, little help, please?

9 years ago
OK. I tried that, and it still isn't working for me. There must be something basic that I'm missing. Here is what I have, what am I missing or doing wrong?

<script>
IF %FIRST = 0 AND %SECOND = 0 THEN $LINKTEXT1 := "Page One..."
IF %FIRST = 0 AND %SECOND = 1 THEN $LINKTEXT1 := "Page Two..."
IF %FIRST = 1 AND %SECOND = 0 THEN $LINKTEXT1 := "Page Three..."
IF %FIRST = 1 AND %SECOND = 1 THEN $LINKTEXT1 := "Page Four..."
</script>

Can't get $LINKTEXT to work, little help, please?

9 years ago

Is it not changing the link at all?

I just tested $LINKTEXT1 in one of my stories so it seems like it must be something with the variables.

Can't get $LINKTEXT to work, little help, please?

9 years ago
I don't see any changes. I created the variables on the variable page, and made sure there was no typo. I just figure that either the site doesn't like me...or I still don't know what I'm doing...

Ok. I went back and (ignorant me), I've never noticed the script button beside the page title. I've been putting the script directly on the page...

It NOW works perfectly...

THANKS to EVERYONE for your input...