View Single Post
Old 12.08.2007, 07:20   #18
Corbin
Архивный участник
 
Join Date: May 2007
Posts: 2
Default

Quote:
Originally Posted by mcrabben7 View Post
I did it all by hand :P
Wow... that had to have taken a while.... You could regexp search for long enough numbers to where you might have to replace them, but still!

P.S.

Kation,

I'm more of a PHP person that perl (in fact I hardly know perl at all), but it seems that:

#setting ids for normal push_const (not npc)
for ($n = 1; $n <= 1019000; $n++) {
$ids[$n]=$n;
}

Could be more effeciently done by just doing this:

if(isset($ids[$tab[1]])) $tab[1]=$ids[$tab[1]];

Where that area is later on.... Then you wouldn't have to waste the memory and slight performance hit behind setting a million value array even if it is only integral values....

(P.S. I'm not sure if there's a function in Perl called isset, but that's what it's called in PHP, and surely there's something similar.)
Corbin is offline