LSPD can find the Vehicle Plate(strcmp problem)
#4

Jo.

btw, I suggest you to read this: https://sampforum.blast.hk/showthread.php?tid=199796
Quote:

If the two strings that you are comparing match, strcmp will return 0. If they dont match, they will return either -1 or 1, depending on the way you have your strings postioned (first or second place).

So, the code looked like this:

if(strcmp(inputtext,CarInfo[i][cPlate],true)) RETURN 0

That's why to put an explaination mark in front of it:
RETURN FALSE FALSE. (math: -- is +, so FALSE FALSE is TRUE).
Do you understand it? - If you use strcmp, use 'if(!strcmp(string1, string2))' and if you check if it is EXACT the same (with intensive case too) use 'if(!strcmp(string1, string2, false))'

- Kevin
Reply


Messages In This Thread
LSPD can find the Vehicle Plate(strcmp problem) - by SkizzoTrick - 10.02.2011, 18:57
Re: LSPD can find the Vehicle Plate(strcmp problem) - by Kwarde - 10.02.2011, 19:10
Re: LSPD can find the Vehicle Plate(strcmp problem) - by SkizzoTrick - 10.02.2011, 19:12
Re: LSPD can find the Vehicle Plate(strcmp problem) - by Kwarde - 10.02.2011, 20:36
Re: LSPD can find the Vehicle Plate(strcmp problem) - by SkizzoTrick - 11.02.2011, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)