The get_score() function does not return negative values as displayed in the GUI.
One has to write a function to gather up the individual segment scores so that one has a script that works when the puzzle has negative values.
Please update get_score() to return negative values.
Yes, that's what I also meant here:
http://fold.it/portal/node/987589
To prevent this, I always use this function instead oft get_score():
function xscore()
temp=get_score()
if temp==0 then
NumSegs=get_segment_count()
for k=1,NumSegs do
temp=temp+get_segment_score(k)
end – k
end – if
return temp
end – function
If get_score() is 0, it creates a pesudo-sum by adding all segment scores.
But I hope, that it won't be needed some ay, as this function doesn't return the same value as get_score(), but it can be used as reference.
Especially after alignment or rebuild, a puzzle score output unequal to a long-lasting 0 is definitely needed.
A friend of me has a very fast PC.
If he does a rebuild, score change this quick that he isn't able to stop rebuilding at a good score.
Looking to the undo bar doesn't help, if the score are equal or below zero.
You need add 8000 points to negatives to get same anmount like displayed. Like this:
function score()
s=get_score()
if s==0 then
for i=1, get_segment_count() do
s=s+get_segment_score(i)
end
s=s+8000 –dunno why, but thats right
end
return s
end
Yes I realize that the sum of the segment part scores is 8000 points less than the GUI score.
The problem is that if the GUI score is negative, get_score() only returns 0, not the negative score displayed.
@Rav3n_pl:
Yes, I noticed a difference, but I didn't that it it is always 8000 points.
I'll change my scripts now.
@smith92clone:
I hope they will fix it for gaining some speed.
If there are problems to change the get_score() function of the game, maybe creating another function would help.
I've modified get_score so it will return negative scores. This will go out in a future update.
This went out in the last update. Marking as resolved.