Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Tag mismatch

$
0
0
This is not an easy question. I need someone with deep compiler knowledge, to explain to me what is happening under the hood.

Working:

Code:

#include <a_samp>

enum E_TEST {
        E_WTF[32]
}

main () {
        new name[] = "Just a name";
        new test[E_TEST];
        strcat((test[E_WTF][0] = '\0', test[E_WTF]), name);
}


Failing

Code:

strcat(((test[E_WTF])[0] = '\0', test[E_WTF]), name); // Warning: tag mismatch

I'm using some really contrived macros and I need the version in brackets to work. I just don't understand why it's not an compiler error, and just a tag mismatch error. Adding tags does not change anything, that's why I'm asking compiler magicians to explain to me the process which is happening here. Thank you

Viewing all articles
Browse latest Browse all 18226

Trending Articles