0 Members and 1 Guest are viewing this topic.
GetCalc("appvPONGhs",Y0){Y0}->WGetCalc("appvPONGhs",Y1){Y1}->KIf sub(CS,"<easy>",Str4Text(29,42,"Highscore:",W>DecElseText(29,42,"Highscore:",K>DecEnd. OTHER CODEIf sub(CS,"<easy>",Str4GetCalc("appvPONGhs",16)->C S->{C} EndIf sub(CS,"<hard>",Str4GetCalc("appvPONGhs",16)->C S->{C+1} End
Getcalc(NAME)->H!If HGetcalc(NAME,SIZE)->HFor(A,0,SIZE)0->{H+A}End
Code: [Select]Getcalc(NAME)->H!If HGetcalc(NAME,SIZE)->HFor(A,0,SIZE)0->{H+A}EndMy first post!
I'm french and only 15, so my english won't be perfect For the loop, it fills bytes of the appvar with 0, because if you don't do that, it will return a random number ( for me that's 219 )and to save your highscores with different difficulties, store easy highscore in {H} , the hard in {H+1}.If the highscore can be higher than 255, do {H}r and {H+2}r .
Getcalc(NAME)->H!If HGetcalc(NAME,SIZE)->HFor(A,0,SIZE)0->{H}End
. Check if game is easyS->{H}End.Check if game is hardS->{H+1}End
{H}->WText(0,0,W{H+1}->CText(0,10,C
GetCalc("appvNAME",Y0)->WText(0,0,WGetCalc("appvNAME",Y1)->CText(0,10,C
For(A,0,SIZE)0->{H+A}End
For(A,0,3)0->{H+A}End
Text(0,0,{H}rDecText(0,10,{H+2}rDec
If S>{H+D}rS->{H+D}rEnd
that's r>Dec if you preferyou've got to add after the pointer "r" (in the angles menu) to get the 2 bytes.
!If GetCalc(NAME)→HFill(0→{GetCalc(NAME,SIZE)→H},SIZE-1)End
I'm playing civilization V so it will be later
can you watch me the part of the program where you use the appvar?