0 Members and 2 Guests are viewing this topic.
^r needs to be included if you are using 16-bit integers (0 to 65535) for your score.
Quote from: blue_bear_94 on July 02, 2012, 11:02:09 amAssume that the SORTD subroutine sorts data in descending order.I also want to correct something:Code: [Select]Data(100^r,90^r,80^r,70^r,60^r,50^r,40^r,30^r,20^r,10^r,0^r)->GDB1HS.later...S->{GDB1HS+10}sub(SORTD,GDB1HS,11).assume SORTD is a subroutine. # of items is 11.But then, a r is missing after the S->{GDB1HS+10}Moreover, no need to make a routine if it is only used once. What I suspect is that you wrote sub(SORTD,GDB1HS,11) to say "you must sort it" without giving the proper code I personally do it the other way round in MisterOops!I check how many scores the current score beats, shift them, then insert the new highscore
Assume that the SORTD subroutine sorts data in descending order.I also want to correct something:Code: [Select]Data(100^r,90^r,80^r,70^r,60^r,50^r,40^r,30^r,20^r,10^r,0^r)->GDB1HS.later...S->{GDB1HS+10}sub(SORTD,GDB1HS,11).assume SORTD is a subroutine. # of items is 11.
Data(100^r,90^r,80^r,70^r,60^r,50^r,40^r,30^r,20^r,10^r,0^r)->GDB1HS.later...S->{GDB1HS+10}sub(SORTD,GDB1HS,11).assume SORTD is a subroutine. # of items is 11.
Right behind the S->{GDB1HS+10}It would be S->{GDB1HS+10}r
Thanks, could you help me with display? Like how to display the highscores from the list ?
Quote from: danny90444 on July 03, 2012, 11:10:11 amThanks, could you help me with display? Like how to display the highscores from the list ?Note, that what I will write will not be optimised at all so you understand everything.To display the first score, you would do Text(0,0,{GDB1HS}r►Dec)To display the second one, you would do Text(0,6,{GDB1HS+2}r►Dec)Why (0,6) ? because there is already the first score in (0,0).Why GDB1HS+2 ? because the first score takes 2 bytes, located at GDB1HS and GDB1HS+1, so the second one is at GDB1HS+2So, to display the third one, you would do Text(0,12,{GDB1HS+4}r►Dec)etc...To display the Ith score, you would do Text(0,I*6,{I*2+GDB1HS}r►Dec)Now, to display them all, just put that in a For loop like this For(I,0,10) Text(0,I*6,{I*2+GDB1HS}r►Dec) EndHope that helps
What's up with the topic title
Quote from: aeTIos on July 04, 2012, 02:52:30 pmWhat's up with the topic title * parserp is confused