Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

[Answered] Commenting Script Out

17 years ago
Does anyone know if you can put Comments in a script?

[Answered] Commenting Script Out

17 years ago

To clarify, I don't mean the comments people leave on stories. I mean, when writing your script, can you write a line that is ignored by the game engine, so you can leave yourself notes. For example, if typing '//' signified a comments line, you might have something like:

// change the player's hit points
%HP := %HP + 1
// now tell the player how many hit points they have
$PAGETEXT := "You have " + %HP + " hit points"

In really long or complicated programs, comments help to remind the writer what parts of the script is about, or to seperate parts of the script into categories. IE,

//page text if it is day time goes here
$PAGETEXT := "blah blah blah"

//page text if it is night time goes here
$PAGETEXT := "blah blah blah"

So, any scripters, do you know if scripting comments can be done? And what you have to type to signify a comment? Probably need AlexP or Solo to answer this, I guess... Haven't seen either in a while...

[Answered] Commenting Script Out

17 years ago

I recall talking to Alex about this

I think not, but I can't remember - was a loong time ago.

[Answered] Commenting Script Out

17 years ago
Yes, you can. You can put # on the end of a line to separate the comments. See here to see it in context if I'm being confusing.

[Answered] Commenting Script Out

17 years ago
Cool!!

[Answered] Commenting Script Out

17 years ago
LOL!!! woot! my forum post did come in handy... though not in the way that i had expected :P

[Answered] Commenting Script Out

17 years ago

#The following script is the 'appreciation' script

%OCTOBER := %AWESOME

%SOLOSTRIKE := %AWESOME

$PAGETEXT := "This is awesome! I never saw that post before. Comments!!!! Now I can add headings and stuff inside my scripts so that I remember what I was doing! Great job guys!"