Tag mismatch
#1

Hi,

Why i get tag mismatch, and how to fix it?

Код:
new bool:ASDQWEQEWQE;

ASDQWEQEWQE = cache_get_field_content_int(0, "weqwe");
When i make variable without bool, and i don't get tag mismatch. Then how to do with bool variable?
Reply
#2

pawn Код:
ASDQWEQEWQE = (!cache_get_field_content_int(0, "weqwe")) ? false : true;
Reply
#3

Thanks.

Another questions:

1. Is threaded queries faster then non-threaded queries (i mean mysql Blueg).

2. Do i need do after OnPlayerDisconnect delete_cache(sdasdasd[ playerid ]), when i for ex: sdasdasd[ playerid ] = save_cache . And if yes, what variable is null for cache? because variable look like this:

new cachedasdasd[ MAX_PLAYERS ];

If i do that (when player connect, or disconnect to know when variable is not -500 or whatever then not delete:

sdasdasd[ playerid ] = -500 i get tag mismatch.
Reply
#4

For future reference - casting to bool is even easier than that, using double negation:
pawn Код:
ASDQWEQEWQE = !!cache_get_field_content_int(0, "weqwe");
As for question:
1. Speed is comparable, but as name suggests, the queries are executed in other thread, so your main game logic doesn't wait until the query is complete.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)