blueg r40
#1

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..
Reply
#2

Regular expressions aren't magic, they can really mess up your code. You can use cache_num_rows instead of cache_get_row_count
Reply
#3

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);
Reply
#4

Regex would be
Quote:

Search: new ([^ =]*) ?= ?(cache_get_value_index_int)\((.*)\)
Replace: $2($3, $1)

In notepad++ replace would be
Quote:

\2(\3, \1)

Reply
#5

But there is no always new somewhere

new blblbla;

blblbla = cache_get_value_int
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)