Author Topic: Chat Commands  (Read 3172 times)

0 Members and 1 Guest are viewing this topic.

Offline foeggy

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Chat Commands
« on: July 30, 2006, 04:30:27 PM »
It is very weird, I can't use the chat commands, but all the other admins on my server can.

P.S. I'm Using 1.13

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Chat Commands
« Reply #1 on: July 30, 2006, 05:21:48 PM »
Mind posting what you have below all the commented section of your ulx/configs/users.ini?
Not just your steamid line, but all your users.
Only thing I can think of besides a script conflict (somehow affecting you but not others), is that theres a syntax problem in your users.ini

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline foeggy

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Chat Commands
« Reply #2 on: July 30, 2006, 05:43:29 PM »
Ok.

"STEAM_0:1:10360079" "abcdefghijklmnopqrstuvwxyz" --Angel

"STEAM_0:1:8452493" "abcdefghijklmnopqrstuvwxyz" --killa

"STEAM_0:0:9249691" "bcdefghijklmnopqrstuvwxyz"  --shugo

oh, and sorry when you joined my server, they are not full admins, and QuinnTheEskimo is more fun then serious

But sorry for the bad impression.

And I think this should head over to FP Help because my Server Mod commands don't work either but other peoples do.
« Last Edit: July 30, 2006, 05:48:15 PM by foeggy »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Chat Commands
« Reply #3 on: July 30, 2006, 06:25:46 PM »
The users.ini uses // instead of -- to comment out its remarks.
You might try changing that. (I'm not sure it matters)

Other than that, just make sure your id line is properly quoted, and, it has the chat flag access.


As many mods as you seem to run, its a wonder ulx will work for you at all. :)
I coudn't even read all of your motd. (no scroll)

If your users.ini file is properly configured, I'd bet you have another admin mod of some sort watching for eventPlayerSay, and its not allowing ULX/or other scripts, to grab your commands.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline foeggy

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Chat Commands
« Reply #4 on: July 30, 2006, 06:58:52 PM »
Well I do have ServerMod, But they are admin on that too.

It also allows things like
/slap
/rcon...


You think that would be interfering, and if so, how would I fix that?

If you have steam friends or xfire or something, we could talk there instead.

Thanks

EDIT: Oh and in the console if I put "say yes"

It comes out with
[LUA] Error Calling 'eventPlayerSay' : 'Line 211 bad argument #1 to 'lower' <string expected, got nil>'
« Last Edit: July 30, 2006, 07:02:54 PM by foeggy »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Chat Commands
« Reply #5 on: July 30, 2006, 11:07:08 PM »
Ah ha!
 The error your getting pretty much shows that ULX isn't your direct problem.
I searched my archive ulx 1.13 directory for any text containing eventPlayerSay
ulx_base.lua has it, and its handling of text is quite nice, IMO.
It also has no lower string function anywhere near line 211 as indicated in your error.
It actually tests to see if you're saying something from console.
If you are saying something from console, it pretty much stops processing any further, and allows whatever you say to be spit back out.
Code: [Select]
if userid == 0 then -- If this is the dedicated server, ignore it or we'll have problem
return strText
end

However, if you aren't saying in console, it goes on to check if what you've said is a ULX command.
If its not, it will always return what you said using return.

I'd be willing to bet your other admin script's eventPlayerSay functions aren't quite as nice about playing with others. Most likely not testing if the console said it, and, possibly, not returning the text that was stated, whether it was one of its commands or not.

The more I look into Megiddo's code, the more I appreciate it. I see insight to things that I can just barely scratch the surface of.

As for how to fix you're other scripts, well, that might take a bit.
I'd start with asking about it with whoever made it if you aren't a coder yourself.

One quick start that would fix your console 'say' error would be to add the above code snippet into the function of your other script(s) that use eventPlayerSay
Just make sure to replace the variable names.
Example, if your other script uses 'eventPlayerSay(whosaidit, whatwassaid, teamtheyareon)
then yours would need to be
   if whosaidit == 0 then -- If this is the dedicated server, ignore it or we'll have problem
      return whatwassaid
   end


"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming