Garry's Mod

Garry's Mod

Portal Gun - Enhanced Aperture Science Handheld Portal Device
Physics Dude 2020 年 4 月 16 日 下午 1:10
How to fix the 'PortalClone' (a nil value) LUA error
Hopefully the OP, CnicK, will see this. I have a fix. This is the best Portal Gun addon of the 5-6 I see on the workshop right now.

The only problem is the odd error spam when a player is moving through a portal in a multiplayer server;
[Portal Gun - Enhanced Aperture Science Handheld Portal Device] lua/autorun/portalmove.lua:213: attempt to index field 'PortalClone' (a nil value) 1. hook - lua/autorun/portalmove.lua:213 2. unknown - lua/includes/modules/hook.lua:84

This is (crudely?) fixed by removing or commenting-out the line (with "--") 213 in lua/autorun/portalmove.lua that reads:
ply.PortalClone:Remove()

After testing this fix in a multiplayer server for over an hour trying to do everything to break it, (endless falling, closing portals on player/props, cleaning map, spamming, etc) I could not get it to generate a single error on a dedicated multiplayer server.

最后由 Physics Dude 编辑于; 2020 年 4 月 16 日 下午 1:11
< >
正在显示第 1 - 1 条,共 1 条留言
CnicK The Crocodile  [开发者] 2020 年 12 月 31 日 上午 9:05 
the error is well fixed
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50