Jump to content

'npchlc_traffic' problem on Linux server


Recommended Posts


I want to use 'npchlc_traffic' resource on my server. But the problem is that it doesn't work correctly at least at Linux public server. I was testing it on my PC (OS Windows) and it works perfectly there. But when I launch it on Linux server - it doesn't load paths correctly. The resource finishes initialization every time at the same line and server writes in console, that 'npchlc_traffic' started successfully without loading paths. And there are no NPCs appearing on the server.

I've tried to load paths through 'npchlc_traffic_editor' resource. The server on my PC loads them perfecly. But Linux server throws an error:

ERROR: [traffic]/npchlc_traffic_editor/save_load_s.lua:248: attempt to perform arithmetic on global 'loadtraffic_nodecount' (a nil value) 

I don't know if it's a Linux server problem, or not. So, is there any solution of it?

Thanks in advance. :)

P.S.: 'npchlc_traffic' fails on any value assignment for multidimensional array. For example:

node_conns[n2][n1] = new_id 

Linux server ignores this line and finishes resource initialization. There are no errors in debugscript or console.

Link to post

It worked. Now console shows the error while loading paths in npchlc_traffic:

[2015-11-01 22:39:32] Starting npchlc_traffic 
[2015-11-01 22:39:32] Starting npc_hlc 
[2015-11-01 22:39:32] Starting server_coldata 
[2015-11-01 22:39:32] ERROR: [resplay]/[traffic]/npchlc_traffic/traffic.lua:5: [resplay]/[traffic]/npchlc_traffic/load_paths.lua:98: attempt to index field '?' (a nil value) 
[2015-11-01 22:39:32] npchlc_traffic restarted successfully 

The 98th line is:

if (ll ~= 0) or (rl == 0) then node_conns[n2][n1] = new_id end 

The same with editor:

[2015-11-01 22:42:51] Loaded 29.9% 
[2015-11-01 22:42:53] ERROR: [resplay]/[traffic]/npchlc_traffic_editor/save_load_s.lua:5: ...y]/[traffic]/npchlc_traffic_editor/fake_elements.lua:117: table index is nil 
[2015-11-01 22:42:54] ERROR: [traffic]/npchlc_traffic_editor/save_load_s.lua:257: attempt to perform arithmetic on global 'loadtraffic_nodecount' (a nil value) 

But I still can't understand, why is this error appears on Linux server, and all works fine on Windows platform...

Link to post

I need to reproduce the problem here.

Please give me a zip of the npchlc resources and the map file you are using and instructions on how to get to the error.

Link to post

Okay, here's zip archive with the folder, that you need to put into 'resources' folder. Then you should launch 'npchlc_traffic' resource in order to reproduce its error.

An editor error appears after several actions:

- Launch 'npchlc_traffic_editor' resource

- Enter the command: /trafficname san_andreas

- Then enter: /trafficload

ZIP archive: http://s000.tinyupload.com/index.php?fi ... 1826792644

Link to post

These files are corrupted:



They should be 1106 KB (1131596 bytes), but the ones you have are 1109 KB (1134940 bytes).

It looks like you used ASCII FTP mode to transfer them at some point and it changed the line endings (which is bad news for binary files). Restore the original files and upload them using Binary mode.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...