Author Topic: Trying to fix GetInfoNum in my plugin  (Read 1946 times)

0 Members and 1 Guest are viewing this topic.

Offline pikkip

  • Newbie
  • *
  • Posts: 27
  • Karma: 1
Trying to fix GetInfoNum in my plugin
« on: March 30, 2013, 01:25:34 PM »
Hello people!
So here's the deal, I've been trying to fix a few old plugins this day, and I got stuck on this error right now.
Code: [Select]
lua/autorun/server/sv_physgun.lua:20: bad argument #2 to 'GetInfoNum' (number expected, got no value)The 20th line in the lua looks like this:
Code: [Select]
if ply:GetInfoNum( pb_.. "enabled" ) ~= 0 thenand ofc. the pb_ is something else (BEFORE the code above)
Code: [Select]
local pb_ = "physgun_buildmode_"
ANY idea why it calls errors? I don't see any form for additional agument on the line...

Offline pikkip

  • Newbie
  • *
  • Posts: 27
  • Karma: 1
Re: Trying to fix GetInfoNum in my plugin
« Reply #1 on: March 30, 2013, 02:02:03 PM »
Well, bloody darn, It turned out that it needed another argument after i read the line again... sorry 'bout that fokes!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Trying to fix GetInfoNum in my plugin
« Reply #2 on: March 30, 2013, 02:28:01 PM »
That rubber duck sure is mystical, no?
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Trying to fix GetInfoNum in my plugin
« Reply #3 on: March 30, 2013, 04:25:24 PM »
Wow. I love that page.
They had me at: (emphasis mine)
Quote
we insist that people who ask questions put some effort into their question, and we're kind of jerks about it

EDIT - I just read the entire page.
And realized...I make an awesome duck, and am proud of that fact.
I may not always know the exact <insert code construct/tech construct/whatever geek question> from scratch...but I'm tech-geek enough to give ideas back to those who ask me questions.
Everyone needs a duck for a friend.
« Last Edit: March 30, 2013, 04:31:43 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming