blueg r40 - 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: blueg r40 (
/showthread.php?tid=616486)
blueg r40 -
MerryDeer - 05.09.2016
Hi,
Since r40 release there was changes
all cache_get_ functions now return their value through a reference parameter instead of returning it directly:
I have cikles where i use that functions and using
for( new r = 0; r < count = cache_get_row_index_count; r ++ )
{
}
(.+?) ?= ?(cache_get_value_.+?\(.*?)\);
\2, \1\);
Mix my code very wrong..
Re: blueg r40 -
Misiur - 05.09.2016
Regular expressions aren't magic, they can really mess up your code. You can use cache_num_rows instead of cache_get_row_count
Re: blueg r40 -
MerryDeer - 05.09.2016
Yes with this ok. But other too mess.
For ex if i have:
new vmodel = cache_get_value_index_int(r,1);
How to replace to
cache_get_value_index_int(r,1,vmodel);
Re: blueg r40 -
Misiur - 05.09.2016
Regex would be
Quote:
Search: new ([^ =]*) ?= ?(cache_get_value_index_int)\((.*)\)
Replace: $2($3, $1)
|
In notepad++ replace would be
Re: blueg r40 -
MerryDeer - 05.09.2016
But there is no always new somewhere
new blblbla;
blblbla = cache_get_value_int