Quote:
Originally Posted by fysiks
- For the error in question: Look at the line below it where you use it correctly.
- You have too many parentheses on that line.
- You shouldn't use sizeof() for that parameter anyways. You should use strlen() if you insist on using anything at all there.
- If you ever need sizeof(string)-1 you should use charsmax(string) instead to make it less confusing for you since charsmax is defined as sizeof minus 1.
|
also if you didnt notice in the code the format needs a higher length because it has to hold weapon_m4a1 and so forth... 7 only holds weapon_.
As for your variable 'x' i would use something like weaponName it helps with readability.
My code has been updated with the suggestion.