• Print

Author Topic: Weird error (one ive never seen at least)  (Read 4230 times)

0 Members and 1 Guest are viewing this topic.

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Weird error (one ive never seen at least)
« on: July 17, 2014, 07:26:30 pm »
I was working on a vote slaynr to make it simple i was going to have the vote script just use ULib.consoleCommand to run the existing slayrn command on the target player using this code

Code: Lua
  1. ULib.consoleCommand( "ulx slaynr " ..target.. "\n" )
however its returning this error

Code: [Select]
attempt to concatenate local 'target' (a userdata value)
tried googeling my issue and couldn't find anything to helpful, anyone have an idea why I am having this error?
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Weird error (one ive never seen at least)
« Reply #1 on: July 17, 2014, 07:36:20 pm »
You need to use target:Nick() or target:Name().
Right now, you're only getting the player.
Out of the Garry's Mod business.

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: Weird error (one ive never seen at least)
« Reply #2 on: July 17, 2014, 07:39:56 pm »
Thanks I was thinking it was something like that my brain just didnt click with it, been away from lua too long.
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

  • Print