Quote:
Originally Posted by Shadows Adi
Code:
// By defining a new variable which stores the string lenght, you avoid multiple function calls ( improving the performance )
new iLen = strlen(szCos)
if(szCos[iLen - 4] == 't' && szCos[iLen - 3] == 'h' && szCos[iLen - 2] == 'i' && szCos[iLen - 1] == 's')
{
// meets the criterias, execute
}
|
now after i did that, it gives me index out of bounds error. previously it works fine. this is driving me nuts !
*edit
nvm, fixed now. just forgot to modify some data