Game Development Community

CRC Errors

by Wayne Eversole · in Torque Game Engine Advanced · 05/21/2009 (9:39 am) · 2 replies

I was trying to install a resource that uses crc checks and this code no longer works under tgea/afx 1.81.

ConsoleFunction(getStringCRC, S32, 2, 2, "getStringCRC(string)")
{
argc;
U32 crcVal;
crcVal = calculateCRC (argv[1], dStrlen(argv[1]), -1);
crcVal = (crcVal*-1)-1;
return(S32(crcVal));
}

Line 5 is the error.
crcVal = calculateCRC (argv[1], dStrlen(argv[1]), -1);

The calculateCRC.

Any Ideas?

Thanks

#1
05/21/2009 (10:35 am)
omm nvm thank I will just try and use md5 hash insted.

Thanks
#2
06/01/2009 (8:16 am)
Just a heads up, though. I had the same problem, and it's because you don't have the CRC namespace defined. Changing the line of code to this will fix it, although I do understand using MD5 is better :)

crcVal = CRC::calculateCRC (argv[1], dStrlen(argv[1]), -1);