• Could someone help spot the error in this?
    9 replies, posted
--[[--------------------------------------------------------- Name: concommand.Run( ) Desc: Called by the engine when an unknown console command is run -----------------------------------------------------------]] function Run( player, command, arguments, args ) local LowerCommand = string.lower( command ) if ( CommandList[ LowerCommand ] != nil ) then CommandList[ LowerCommand ]( player, command, arguments, args ) return true end if ( player:IsValid() ) then player:ChatPrint( "Unknown Command: '" .. command .. "'\n" ) end return false; end
What's the error? What's the purpose of this thread?
Need a bit more than this, as Robotboy said, the error, and a bit more code i.e. how are you calling it? are you actually passing the correct arguments through?
:66: bad argument #1 to 'lower' (string expected, got nil) My bad, I forgot to post an error. And the purpose is to see if someone could possible see where I went wrong.
That just means you're not passing an argument for 'command'. Where are you calling this from?
Edited my post + error. Sorry for the confusion.
-snip- You're doing something wibbly with concommands, what concommands have you setup in your code?
Console commands have 3 arguments: Player, cmd, args you're using 4.
[QUOTE=Acecool;44722285]Console commands have 3 arguments: Player, cmd, args you're using 4.[/QUOTE] That's not the problem here, he seems to edit core lua files?
[QUOTE=Acecool;44722285]Console commands have 3 arguments: Player, cmd, args you're using 4.[/QUOTE] Console commands have 4 arguments: player, command, arguments, args args is a string of what is after the command's name when it is called
Sorry, you need to Log In to post a reply to this thread.