03.01.2017, 09:35
(
Last edited by Gammix; 03/01/2017 at 10:12 AM.
)
That's the difference between run time and compile time.
Like if you put a number itself 'array[10]', 10 is the size and index should be < 10; compiler gives you an error because 10 is a constant but if you use a variable, it can be anything, compiler cannot predict values, so you'll get run time in that case.
And "strcat" might have internal checks to avoid run time errors.
Edit: i misread strcat part, thats probably overwriting the EOS index of "array". Which i believe is a PAWN bug!
Like if you put a number itself 'array[10]', 10 is the size and index should be < 10; compiler gives you an error because 10 is a constant but if you use a variable, it can be anything, compiler cannot predict values, so you'll get run time in that case.
And "strcat" might have internal checks to avoid run time errors.
Edit: i misread strcat part, thats probably overwriting the EOS index of "array". Which i believe is a PAWN bug!