Install Steam						
					
				
				
									login
											 | 
						language
						
																																					简体中文 (Simplified Chinese)
																													繁體中文 (Traditional Chinese)
																													日本語 (Japanese)
																													한국어 (Korean)
																													ไทย (Thai)
																													Български (Bulgarian)
																													Čeština (Czech)
																													Dansk (Danish)
																													Deutsch (German)
																																							Español - España (Spanish - Spain)
																													Español - Latinoamérica (Spanish - Latin America)
																													Ελληνικά (Greek)
																													Français (French)
																													Italiano (Italian)
																													Bahasa Indonesia (Indonesian)
																													Magyar (Hungarian)
																													Nederlands (Dutch)
																													Norsk (Norwegian)
																													Polski (Polish)
																													Português (Portuguese - Portugal)
																													Português - Brasil (Portuguese - Brazil)
																													Română (Romanian)
																													Русский (Russian)
																													Suomi (Finnish)
																													Svenska (Swedish)
																													Türkçe (Turkish)
																													Tiếng Việt (Vietnamese)
																													Українська (Ukrainian)
																									Report a translation problem
							
						
 
											 
													


 
						

 
			 
			





If you ever find time to fix this, here are the git repositories of all addons involved:
https://github.com/metrostroi-repo/MetrostroiAddon
https://github.com/TeamUlysses/ulib
function Metrostroi.GetTimedT(notsync)
local T0 = GetGlobalFloat("MetrostroiT0",os.time())+GetGlobalFloat("MetrostroiTY")
local T1 = GetGlobalFloat("MetrostroiT1",CurTime())
local dT
if notsync then
dT = (os.time()-T0) - (CurTime()-T1)
else
dT = (os.time()-T0 + (CurTime() % 1.0)) - (CurTime()-T1)
end
return dT
end
function Metrostroi.GetSyncTime(notsync)
return os.time()-Metrostroi.GetTimedT(notsync)
end
This might be a red herring.
But this one is promising:
hook.Add("PlayerButtonUp","metrostroi_button",function(ply, button)
local train,seat = ply:GetTrain()
if IsValid(train) and train.KeyBuffer then
if train.KeyBuffer[button] then
train.KeyBuffer[button] = nil
train:OnKeyEvent(button,false,ply,train.DriverSeat ~= seat)
end
end
end)
I am not familiar with LUA but, maybe ply is not defined somehow?
Metrostroi cannot initialize with this addon enabled, making it unusable. I have tested it only with Metrostroi and your library enabled, disabling this library fixes the issue.
It would be great to fix this, because then I will be able to use the omni man swep on the train.
The error:
[Metrostroi Subway Simulator - Scripts] lua/entities/gmod_track_clock_interval/init.lua:80: attempt to call field 'GetSyncTime' (a nil value)
1. unknown - lua/entities/gmod_track_clock_interval/init.lua:80 (x6)
[Metrostroi Subway Simulator - Scripts] lua/entities/gmod_subway_base/init.lua:1559: attempt to call method 'GetTrain' (a nil value)
1. fn - lua/entities/gmod_subway_base/init.lua:1559
2. unknown - lua/ulib/shared/hook.lua:109
1. Function - gamemodes/sandbox/gamemode/player_extension.lua:93
2. func - lua/includes/extensions/entity.lua:158
3. unknown - lua/includes/modules/hook.lua:267