StinGeR_93 Posted November 1, 2015 Share Posted November 1, 2015 Hi. 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 comment
MTA Team ccw Posted November 1, 2015 MTA Team Share Posted November 1, 2015 The problem is error messages in coroutines can be lost. Put the code from here: https://wiki.multitheftauto.com/wiki/Coroutine.resume at the top of the following files: npchlc_traffic\traffic.lua npchlc_traffic_editor\save_load_s.lua Then run and check the error messages. Link to comment
StinGeR_93 Posted November 1, 2015 Author Share Posted November 1, 2015 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 comment
MTA Team ccw Posted November 1, 2015 MTA Team Share Posted November 1, 2015 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 comment
StinGeR_93 Posted November 2, 2015 Author Share Posted November 2, 2015 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 comment
MTA Team ccw Posted November 3, 2015 MTA Team Share Posted November 3, 2015 These files are corrupted: npchlc_traffic\paths\maps\san_andreas npchlc_traffic_editor\paths\san_andreas 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 comment
StinGeR_93 Posted November 3, 2015 Author Share Posted November 3, 2015 Wow, now it's working I'm using FileZilla to transfer files. It selects transfer mode automatically by default. I've selected binary mode and uploaded san_andreas file and now the resource works perfectly. Thanks a lot! Link to comment
MTA Team ccw Posted November 3, 2015 MTA Team Share Posted November 3, 2015 No problem. Seems like most FTP clients automatically select ASCII mode for extension-less file names. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now