General > Developers Corner
I need someone to troubleshoot
JamminR:
The server, or the player this is running on, should get errors somewhere.
Either at server startup, or when the command is run.
I don't normally blatantly do this.
But here is what I think should work. Compare it to whatever code you've already got.
--- Code: ---CATEGORY_NAME = "homemade stuff"
function ulx.fmotd( calling_ply, target_ply )
target_ply:ConCommand( "ulx motd" )
ulx.fancyLogAdmin( calling_ply, true, "#A Forced #T to look at the Motd!", target_ply )
end
local fmotd = ulx.command( CATEGORY_NAME, "ulx fmotd", ulx.fmotd, "!fmotd", false )
fmotd:addParam{ type=ULib.cmds.PlayerArg }
fmotd:defaultAccess( ULib.ACCESS_ADMIN )
fmotd:help( "Forces a Player to look at the Motd." )
--- End code ---
That's untested, but should work as far as my memory goes.
I wasn't sure if you wanted it as a "ulx fmotd" or just "fmotd" from the command line.
I went ahead and made it ulx fmotd
Government Official:
Thanks it works fine
JamminR:
Welcome.
But the question is, can you see, compared to your last try, where some changes were made that might have broken yours?
Learning from what you have presented is best method for most.
Just taking it and putting it into your own file without knowing why it worked doesn't teach.
Government Official:
Yea i checked with the one I tried to edit with the changes u Suggested and I didn't see a difference except for the ulx fmotd thing Ill compare to the one I showed u guys
Navigation
[0] Message Index
[*] Previous page
Go to full version