Non-threaded

Forums » Newbie Central » Read Thread

Introduce yourself and get to know the community.

Properly displaying numbers

5 years ago

So, I've been working with scripting stuff in the editor and when I make a conditional script in the page link to display additional variable changes, they just appear as the code I input for them. Is there a way to fix this?

 Here's an explanation of what I mean incase I didn't explain properly above.

 I'm working on combat in my game, and on one page I have in the script the following:

IF % TOHIT > 10 THEN

BEGIN

$PAGETEXT := " You are struck and suffer %%ENEMDAM%% damage!"

END

 

 For the most part, everything's working properly, except it shows %%ENEMDAM%% on the page instead of the number of the variable.

Properly displaying numbers

5 years ago
You're doing too much in too many places. Use the double percents for when you type directly in the text box for the text of the page. Don't use the double percents when you use the script box. Instead, you can do something like

$PAGETEXT := "You are struck and suffer " + %ENEMDEM + " damage!"

Properly displaying numbers

5 years ago

I kinda figured that's where I was going wrong. Alright. Thanks.