Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Problem with my script?

10 years ago

NOTE: This is probably painfully obvious, but I'm quite new at this.

After reading BerkaZerka's article, I attempted to make my own on-page script. It isn't working, and I'm quite baffled as to why not. Would anyone care to take a gander at the problem?

%%COLD%<%10%You and your men are freezing. Things are looking dire.%%%COLD%<%20%You and your troupe are cold, and require warmth sooner if not later.%%%COLD%<%30%You and your merry band are chilly, but nowhere near death.%%%COLD%<%40%Your band's levels of cold are acceptable.%%%MEN%<%5%Your group is severely under-populated.%%%MEN%>%10%You don't have many people in your group.%%%MEN%>%15%Your group is larger than it once was, but there's still a lot of room for growth.%%MEN%>%30%Your band is quite sizeable now.%%%MEN%>50%Your once-small band of people is now a village in its own right.%

Problem with my script?

10 years ago

Start & end with %% - So where you have %%%, you need %%%% & %% at the very end.  :)

Problem with my script?

10 years ago

Also note, that any TRUE Statement will show. So if you have a %COLD of zero, that is true for < 10, < 20, <30, <40, etc. With what you have so far, it would show all the text options at once.

You'll need to be more specific in your logic.

Example:

%%COLD%<%10%You and your men are freezing. Things are looking dire.%%%%COLD%=%10%You and your troupe are cold, and require warmth sooner if not later.%%%%COLD%=%20%You and your merry band are chilly, but nowhere near death.%%%%COLD%<%20%Your band's levels of cold are acceptable.%%%%MEN%<%5%Your group is severely under-populated.%%%%MEN%=%5%You don't have many people in your group.%%%%MEN%=%10%Your group is larger than it once was, but there's still a lot of room for growth.%%%%MEN%=%15%Your band is quite sizeable now.%%%%MEN%>15%Your once-small band of people is now a village in its own right.%%

Problem with my script?

10 years ago

The script appears to be working (doing the scripts before the writing), but I'm still getting the "%%" before a message. This is what's at the bottom of the page.

 

%%MEN%>15%Your once-small band of people is now a village in its own right.%%You have enough food.

Problem with my script?

10 years ago

That just means you got the incorrect number of % in the on-page code.

EDIT - Yep. Your last one was missing a % after the >

Problem with my script?

10 years ago

%%COLD%<%10%You and your men are freezing. Things are looking dire.%%%%COLD%=%10%You and your troupe are cold, and require warmth sooner if not later.%%%%COLD%=%20%You and your merry band are chilly, but nowhere near death.%%%%COLD%<%20%Your band's levels of cold are acceptable.%%%%MEN%<%5%Your group is severely under-populated.%%%%MEN%=%5%You don't have many people in your group.%%%%MEN%=%10%Your group is larger than it once was, but there's still a lot of room for growth.%%%%MEN%=%15%Your band is quite sizeable now.%%%%MEN%>%15%Your once-small band of people is now a village in its own right.%%

Problem with my script?

10 years ago

Yep. Like I said (via PM) it confuses the editor pretty bad if you don't have the number of "%"s right. I used to mess that up all the time when I started using it. xD