Possibly a "Turn Script" Bug[SOLVED]
Anonynn
08 Jul 2016, 19:35I'm not sure if this is a bug or not, and I've brought it to Pixie's attention but maybe there something we're not seeing.
I have a turn script that is supposed to slowly progress over a number of turns. This, for example.
player.turnscript = player.turnscript + 1
if (player.turnscript = "blah blah blah") {
EnableTurnScript (poopadoopa)
}
if (player.turnscriptcount = 20) {
msg ("")
}
if (player.turnscriptcount = 40) {
msg ("")
}
}
However, there is a variable that allows the player to skip some of those turns, for example...
player.turnscript = player.turnscript + 1
if (player.turnscript = "blah blah blah") {
EnableTurnScript (poopadoopa)
}
if (player.turnscriptcount = 20) {
if (player.coolness = "isadork") {
player.turnscript = 59
}
msg ("")
}
if (player.turnscriptcount = 40) {
msg ("")
}
if (player.turnscriptcount = 60) {
msg ("")
}
But once the script skips to turn 59 it just stops working. There's no error or anything. It just won't progress past turn 59. I thought maybe I had written it incorrectly at first so I tried...
player.turnscriptcount = player.turnscriptcount + 1
player.turnscriptcount = player.turnscriptcount + 59
and even reenabling the turn script after that turn, but nothing seems to work.
Anyone have any ideas if this is a bug or if something else is going on? ((BTW I hate not having a "code" paste option cause that made all my spacing look atrocious))
hegemonkhan
09 Jul 2016, 03:21this forum uses the 'markdown' language:
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code (scroll down a ways, about half way down the page, to the section called 'code and syntax highlighting')
so, to do the "code box" with it:
press the key to the left of the '1' key on your keyboard (the horizontal row of the numbers at the top of the keyboard, not the phone dial pattern on the right side, if you keyboard has these keys), three times. Press 'enter' key to go to the new line below, paste in your code. Press the 'enter' key again, to go to the new line below. press the key to the left of the '1' key on your keyboard, again three times. That's how you do the code block with this 'markdown' language, which produces this:
paste_your_code_here
Jay Nabonne
09 Jul 2016, 11:46Is this the real code stripped down? You seem to have "turnscript" and "turnscriptcount" used interchangeably and differently. (For example, sometimes turnscript is treated as a "blah blah blah" string and other times as as number. Also, you increment "turnscript" but compare "turnscriptcount".) That's the first thing to jump out at me. But if that's just an artifact of how you've posted and the real code is otherwise, then it will be hard to tell without seeing the real code. :)
Also, how are you determining that it's not getting past 59?
Anonynn
09 Jul 2016, 20:38Hey Jay :) Long time no see.
Yes, this is just fake artifact code. I didn't know how appropriate the real code would be. But it won't go beyond "59" because I have text at "60" that never shows up.
I can post the real code/problem if you like but it might not be appropriate for the general public.
Jay Nabonne
10 Jul 2016, 15:11Even if it needs some stripping (no pun intended), it would help to see the actual variables and code structure used. You can also email it to me (jaynabonne at gmail dot com) if that works better.