Turn script error message.

CheeseMyBaby
01 Apr 2018, 18:22I have this turn script, it's a simple one. It switches off at turn 45 and everything seems to work except I get this error message:
(to clarify: I get the error message at turn 45. Never sooner, never later.)
"Error running script: Error compiling expression 'turnscript': RootExpressionElement: Cannot convert type 'Int32' to expression result of 'Element'"
Everything seems to work just fine... it's just annoying with that error message popping up.
This is the code for the turn script:
player.turns = player.turns +1
if (player.turns = 30) {
msg ("<font color=blue><sub><b>The block of ice in your pocket is starting to melt.</b></sub></font>")
}
else if (player.turns = 45) {
msg ("<font color=blue><sub><b>The block of ice has melted, leaving you with a huge stain in the crotch area.</b></sub></font>")
DisableTurnScript (player.turns)
SetObjectFlagOn (player, "haspee")
MoveObject (ice, VOID)
}
else {
}
Any ideas what I've fudged up this time?

Forgewright
01 Apr 2018, 18:27get DisableTurnScript (player.turns)
Why the 'get'?
Should be
DisableTurnScript (player.turns)
XanMag
01 Apr 2018, 18:27Try disabling the turn script on move 46. See if that helps?

DarkLizerd
01 Apr 2018, 18:33or try disabling the script on turn 5 so you don't have to wait so long...
But it does sound like the disable command is the problem.
BTW, what is the name of your turn script?

CheeseMyBaby
01 Apr 2018, 18:35@forgewright
That 'get' is not in the code... don't really know how it ended up here when I copy/paste it.
I tried to update it here on the forum but it wouldn't let me.
@xanmag
It helps in the sense that the error message pops up one turn later. It's an improvement for sure... I'm hoping to get rid of it all together though :)
(I liked your easter game!!)

K.V.
01 Apr 2018, 18:35player.turns is an integer, not a turn script. Correct?

CheeseMyBaby
01 Apr 2018, 18:36@darklizerd
it's called icemelt

CheeseMyBaby
01 Apr 2018, 18:37@K.V.
That's correct!
(I liked your easter game too!!!)

K.V.
01 Apr 2018, 18:38DL is on the right track. What is the name of the turnscript? That's what goes in DisableTurnScript()
.

CheeseMyBaby
01 Apr 2018, 18:41Oh dear.
Can every kind soul who replied to (and read) this thread please forget about this ever happening?
Please?
Thanks guys. It's working now :)

K.V.
01 Apr 2018, 19:27You know what it means when you're messing something up in my world?
It only means you're doing something!
I liked your easter game too
Thanks!

DarkLizerd
01 Apr 2018, 20:59The only person that does not learn anything, is the one not making mistakes...

CheeseMyBaby
01 Apr 2018, 21:29@K.V. & DL
Wise words :)