Garry's Mod

Garry's Mod

Portal Gun - Enhanced Aperture Science Handheld Portal Device
Physics Dude 16 Apr, 2020 @ 1:10pm
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.

Last edited by Physics Dude; 16 Apr, 2020 @ 1:11pm
< >
Showing 1-1 of 1 comments
CnicK The Crocodile  [developer] 31 Dec, 2020 @ 9:05am 
the error is well fixed
< >
Showing 1-1 of 1 comments
Per page: 1530 50