Author Topic: Prophunt Custom Made Commands Error  (Read 3290 times)

0 Members and 2 Guests are viewing this topic.

Offline James Aitchison

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Prophunt Custom Made Commands Error
« on: October 29, 2016, 11:21:41 AM »
My ULib/ULX versions (run "ulx version" in console):
ULib v2.61d (10/27/16)
ULX v3.70d (02/28/16)

Game mode(s) I am having this problem on: PropHunt

Lua errors shown in console, if any:
Code: [Select]
[ERROR] addons/ulx-master/lua/ulx/modules/sh/owencommands.lua:138: attempt to index local 'target_plys' (a nil value)

  1. afk - addons/ulx-master/lua/ulx/modules/sh/owencommands.lua:138

   2. unknown - addons/ulx-master/lua/ulx/modules/sh/owencommands.lua:147

    3. include - [C]:-1

     4. unknown - addons/ulx-master/lua/ulx/init.lua:34

      5. include - [C]:-1

       6. unknown - addons/ulx-master/lua/ulib/modules/ulx_init.lua:2

        7. include - [C]:-1

         8. unknown - addons/ulib-master/lua/ulib/init.lua:74

          9. include - [C]:-1

           10. unknown - addons/ulib-master/lua/autorun/ulib_init.lua:3

The file it's refering too:
http://pastebin.com/vzK8JiFS


Please help as i have been spending hours trying to get this to work. I have googled the error as well as used a previous code released on facepunch, but that was back in january 2014 so the code doesnt want to work with the gmod updates since then.

Thank you in advance to anyone who can help me solve this,

James
« Last Edit: October 29, 2016, 11:23:41 AM by James Aitchison »

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Prophunt Custom Made Commands Error
« Reply #1 on: October 29, 2016, 11:39:17 AM »
First of all, your ulx and ulib are slightly outdated, you can get the latest here.

As far as I know, the "Team()" function can only be called on one person (I could be wrong). Also, SetTeam() can only be called on the client, so you'd need a check for that.

So, really, I don't think this can be a multi target thing, just try it with one, it would probably be easier anyways.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline James Aitchison

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Re: Prophunt Custom Made Commands Error
« Reply #2 on: October 29, 2016, 11:59:30 AM »
First of all, your ulx and ulib are slightly outdated, you can get the latest here.

As far as I know, the "Team()" function can only be called on one person (I could be wrong). Also, SetTeam() can only be called on the client, so you'd need a check for that.

So, really, I don't think this can be a multi target thing, just try it with one, it would probably be easier anyways.

Ah I see, that you for the update.

My LUA skills are next to none, so when you say the "Team()" function, would that be in replacement of "target_ply:Team()"? And the same goes for the "SetTeam()" function?

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given