rendered paste bodyfunction LoadDefInfo($FileName)
{
$File = openDef($FileName);
foreach ($File as $line)
{
echo $line . "<br />";
$line = trim($line)
if (($line[0] == "/" && $line[1] == "/") || ($line[0] == '\n' || $line[0] == '\r\n'))
{
break; // Kill the loop - this line is blank or the item is commented out (Hence not in use).
}
$line = explode('\t',$line);
$ItemID = $line[1]; // This should return the item id...
// TEMP
$TableKey = "name model type value1 value2 value3 BmNum index sizex sizey smallbmnum weight stockable FillWeight qualifier gfxmods ItemGroupID TextDescID BasePrice Techlevel Itemflags shortname end";
$TableKey = explode('\t',$TableKey);
// END TEMP
$DefInfo = new array();
for ($i=0;$i<count($line)-1;$i++)
{
$DefInfo[$ItemID] = array($TableKey[$i], $line);
}
}
}