Tag mismatch - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag mismatch (
/showthread.php?tid=490306)
Tag mismatch -
audriuxxx - 26.01.2014
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?
Re: Tag mismatch -
Konstantinos - 26.01.2014
pawn Код:
ASDQWEQEWQE = (!cache_get_field_content_int(0, "weqwe")) ? false : true;
Re: Tag mismatch -
audriuxxx - 26.01.2014
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 cache
dasdasd[ 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.
Re: Tag mismatch -
Misiur - 26.01.2014
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.