Forums » Bugs

Where did ufuncs go?

Mar 27, 2010 Aticephyr link
About half my plugins were just wiped out. Was this a mistake or a deprecation?

An example traceback:
plugins/MakeFriends/mf.lua:75: attempt to index global 'ufuncs' (a nil value)
stack traceback:
plugins/MakeFriends/mf.lua:75: in function 'LoadSettings'
plugins/MakeFriends/mf.lua:159: in main chunk
(tail call): ?
plugins/MakeFriends/main.lua:24: in function 'startup'
plugins/MakeFriends/main.lua:30: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:412: in function 'OnInterfaceReset'
vo/vo.lua:438: in function <vo/vo.lua:436>Loaded plugin 'AnnounceTarget'
Mar 27, 2010 raybondo link
A lua function called SplitStationID() was renamed to SplitLocationID(). I believe that is the root of the problem. the VO client code doesn't use the function so I thought it was ok to rename it.
Mar 27, 2010 mr_spuck link
I think it's because it calls ForEachPlayer before login.. which doesn't work anymore.

Replacing tcs-plugins/common.lua with this thing should fix it for now http://omploader.org/vM3ljNw/common.lua

If you have an older verions, look for ForEachPlayer in AAAufuncs (I think) and put "if GetPlayerName() then ... end" around it.
Mar 27, 2010 Inco link
Thank you mr_spuck. There is more problems with TCS. Can you look into it? Scuba Steve doesn't care about TCS much anymore.

IDK why the update also vanished my TargetLess binding.
Mar 27, 2010 PaKettle link
sent vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:482: in main chunk
sent vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:482: in main chunk
vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:482: in main chunk
vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:482: in main chunkUnable to execute vo/vo.lua!
Error:
[Sat 27 Mar 2010 09:57:57 AM EDT] Flight-Assist mode enabled.
[Sat 27 Mar 2010 09:57:57 AM EDT] Auto-Aim enabled.
cannot open plugins/tcs-plugins/vo/if_hud.lua: No such file or directory
sent vo/if_hud.lua:1180: cannot open plugins/tcs-plugins/vo/if_hud.lua: No such file or directory
stack traceback:
[C]: in function 'error'
vo/vo.lua:323: in function 'dofile'
vo/if_hud.lua:1180: in function 'Reload'
vo/if_hud.lua:381: in function 'func'
vo/vo_event.lua:28: in function <vo/vo_event.lua:26>
[C]: in function 'xpcall'
vo/vo_event.lua:87: in function '_do_event'
vo/vo_event.lua:108: in function <vo/vo_event.lua:103>
sent vo/if_hud.lua:1180: cannot open plugins/tcs-plugins/vo/if_hud.lua: No such file or directory
stack traceback:
[C]: in function 'error'
vo/vo.lua:323: in function 'dofile'
vo/if_hud.lua:1180: in function 'Reload'
vo/if_hud.lua:381: in function 'func'
vo/vo_event.lua:28: in function <vo/vo_event.lua:26>
[C]: in function 'xpcall'
vo/vo_event.lua:87: in function '_do_event'
vo/vo_event.lua:108: in function <vo/vo_event.lua:103>
Welcome to Vendetta Online.

[Sat 27 Mar 2010 09:58:27 AM EDT] Welcome to Vendetta Online.

and again on logout....

sent vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:412: in function 'OnInterfaceReset'
vo/vo.lua:438: in function <vo/vo.lua:436>
sent vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:412: in function 'OnInterfaceReset'
vo/vo.lua:438: in function <vo/vo.lua:436>
vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:412: in function 'OnInterfaceReset'
vo/vo.lua:438: in function <vo/vo.lua:436>
vo/vo_gamefuncs.lua:109: attempt to index global 'player' (a nil value)
stack traceback:
vo/vo_gamefuncs.lua:109: in function 'GetMaxRadarDistance'
vo/vo_user.lua:6: in function 'ForEachPlayer'
plugins/tcs-plugins/common.lua:190: in function 'file'
plugins/tcs-plugins/main.lua:44: in function 'require'
plugins/tcs-plugins/main.lua:47: in function 'f'
vo/vo.lua:370: in function 'sb'
vo/vo.lua:412: in function 'OnInterfaceReset'

Hope it helps.
Mar 27, 2010 raybondo link
Ah yeah, ForEachPlayer was changed as well. I'll have to fix that so it won't lua error if called while not logged in.
Mar 27, 2010 David Flory link
Great didn't all squeeze into the allotted space. How should we communicate info on this type of problem?
Mar 27, 2010 raybondo link
well, i guess i'll have to push out a fix.
Mar 27, 2010 maq link
as for splitstationid thing,

put:
SplitStationID = SplitLocationID

at the top of main.lua for affected plugin, like stationfind
Mar 27, 2010 raybondo link
New update 1.8.120.1 is available. it adds a compatibility function to fix this problem.