Message Board
Register

Re: Finally fixed

Posted by BradleeTheNerd on .
thank you vimm

In reply to: Finally fixed posted by Vimm on .
Think I finally have it solved.

Every game has a unique hash. Full Spectrum Warrior is 0e468022 while Global Defence Force Tactics is 0e284728. No problems there (0e468022 != 0e284728), yet somehow the nightly scan sees both games as one.

I did some digging and oddly the statement ("0e468022" == "0e284728") is TRUE in PHP! Why? Seems a string in the format "0eX" (where X is any string of numbers) translates to (0 * 10x). Multiplying any number by zero is always zero, so (0 * 10468022) is zero, and (0 * 10284728) is also zero.

Using the strcmp() function to compare them fixed it. The scan now sees Global Defence Force Tactics as a different game and properly created a new record.