• Print

Author Topic: ULib.cmds.StringArg (reason help)  (Read 4955 times)

0 Members and 1 Guest are viewing this topic.

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
ULib.cmds.StringArg (reason help)
« on: May 27, 2015, 05:39:39 pm »
Hello! So im working on this and im adding a reason section!

Heres the problem:



I have no idea why there is the 1000.00!!! Please tell me what this is and WHY its here! Thanks!

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
Re: ULib.cmds.StringArg (reason help)
« Reply #1 on: May 27, 2015, 07:43:14 pm »
Can you show the source of what you're currently doing?
But without it, for a quick demo:
Code: Lua
  1. function ulx.bleh( calling_ply, reason )
  2.     ulx.tsayError( calling_ply, "#A is bored because: #s", reason )
  3. end
  4.  
  5. local bleh = ulx.command( "Bleh", "ulx bleh", ulx.bleh, "!bleh" )
  6. bleh:addParam{ type=ULib.cmds.PlayersArg }
  7. bleh:addParam{ type=ULib.cmds.StringArg, hint="Reason?" }
  8.  

The one above should work, or if it's in a string/msg of some sort I would recommend using ".." like example in my impersonate:
Code: Lua
  1. v:ConCommand("say " .. msg .. "\n") -- Sends the message
« Last Edit: May 27, 2015, 07:45:25 pm by Tomzen »
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: ULib.cmds.StringArg (reason help)
« Reply #2 on: May 27, 2015, 09:56:47 pm »
Do you have a take rest of line in there?

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
Re: ULib.cmds.StringArg (reason help)
« Reply #3 on: May 27, 2015, 09:59:05 pm »
Do you have a take rest of line in there?

Oh yeah, that would probably fix it! ^^
Should've saw that before.
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: ULib.cmds.StringArg (reason help)
« Reply #4 on: May 27, 2015, 10:01:44 pm »
Oh yeah, that would probably fix it! ^^
Should've saw that before.
Yup, that's most likely the issue and the numarg is just going to the default value of 1k.

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: ULib.cmds.StringArg (reason help)
« Reply #5 on: May 28, 2015, 02:48:57 am »
The way i'm using it is ULib.tsay( calling_ply, "blah blah words for this reason: "..reason.."!")

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: ULib.cmds.StringArg (reason help)
« Reply #6 on: May 28, 2015, 04:17:05 pm »
I solved the problem!!!

Problem: My args were backwards!

  • Print