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
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
About the author
#2
crcVal = CRC::calculateCRC (argv[1], dStrlen(argv[1]), -1);
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);
Torque Owner Wayne Eversole
Default Studio Name
Thanks