0 Members and 1 Guest are viewing this topic.
I don't see why, you just have do do {H} and {H+1}check if that's not an other part of your game who fails.
Quote from: ScoutDavid on December 18, 2010, 12:28:43 pmQuote from: Fast Crash on December 18, 2010, 10:09:48 amI'm playing civilization V so it will be later Hum... OK.It didn't work, the appvar is created, but the HS is always 0, both for easy and hard.Code: [Select]!If GetCalc(NAME)→HFill(0→{GetCalc(NAME,SIZE)→H},SIZE-1)EndI gotta try that too Runner always optimizing That leaves the pointer in the Fill( statement at zero, so you're basically copying size-1 bytes starting at address $0000, instead of the address of your appvar, which is definitely not what you want.TryCode: [Select]!If GetCalc(NAME)0→{GetCalc(NAME,SIZE)→H}Fill(H,SIZE-1)Endinstead.
Quote from: Fast Crash on December 18, 2010, 10:09:48 amI'm playing civilization V so it will be later Hum... OK.It didn't work, the appvar is created, but the HS is always 0, both for easy and hard.Code: [Select]!If GetCalc(NAME)→HFill(0→{GetCalc(NAME,SIZE)→H},SIZE-1)EndI gotta try that too Runner always optimizing
I'm playing civilization V so it will be later
!If GetCalc(NAME)→HFill(0→{GetCalc(NAME,SIZE)→H},SIZE-1)End
!If GetCalc(NAME)0→{GetCalc(NAME,SIZE)→H}Fill(H,SIZE-1)End
Quote from: shmibshere is a good was to deal with highscore appvars:place this at the beginning of your program:Code: [Select]:"appvNAME"→Str1:GetCalc(Str1)→θ:!If θ:UnarchiveStr1:GetCalc(Str1)→θEnd:!If θ:GetCalc(Str1,[desired size])→θENDthis first checks to see if appvNAME exists in RAM. if not, it attempts to unarchive appvNAME. if it is not found in the archive, the appv is created and made [desired size] bytes long. the pointer to the beginning of appvNAME is stored in theta, so accessing/storing is as easy as {θ+[n]} or S→{θ+[n]}at the end of your program simply add:Archive Str1for safe-keepingI gotta try that too!! Oh my god, it looks good, thank you!
here is a good was to deal with highscore appvars:place this at the beginning of your program:Code: [Select]:"appvNAME"→Str1:GetCalc(Str1)→θ:!If θ:UnarchiveStr1:GetCalc(Str1)→θEnd:!If θ:GetCalc(Str1,[desired size])→θENDthis first checks to see if appvNAME exists in RAM. if not, it attempts to unarchive appvNAME. if it is not found in the archive, the appv is created and made [desired size] bytes long. the pointer to the beginning of appvNAME is stored in theta, so accessing/storing is as easy as {θ+[n]} or S→{θ+[n]}at the end of your program simply add:Archive Str1for safe-keeping
:"appvNAME"→Str1:GetCalc(Str1)→θ:!If θ:UnarchiveStr1:GetCalc(Str1)→θEnd:!If θ:GetCalc(Str1,[desired size])→θEND
Unarchive str1Getcalc(Str1)->HEct...
yea, that's easy.You can directly let at the beginning of the program :Code: [Select]Unarchive str1Getcalc(Str1)->HEct...if the appvar doesn't exist, it will do nothing.
{H}->BText(0,0,B
Text(0,0,{H}
the second, more optimized. Don't forget the >Dec If you send me the 8xp i could work on it and make many optimizations
I don't think you saw all optimizations. I saw many others that i could do but i would have to test it to see if it works.