30-01-2013, Wednesday-23:23:01
bitte die scneario_base aus r6305 nehmen
oder alternativ folgende Zeilen rein bauen:
Das Problem war, dass find(tool_add_city) 0 zurueck gab, man muss aber auf 'null' testen ...
![Smile Smile](https://simutrans-forum.de/mybb/images/smilies/smile.png)
Code:
function is_tool_allowed(pl, tool_id, wt)
{
if (pl == 1) return true
return scenario.forbidden_tools.find( tool_id )==null; // null => not found => allowed
}
Das Problem war, dass find(tool_add_city) 0 zurueck gab, man muss aber auf 'null' testen ...