#adonis plugin server.RunCommand

1 messages · Page 1 of 1 (latest)

light perch
#

im just trying to to play a sound through a plugin when the command is executed but whenever i try using server.RunCommand() it errors saying 'attempt to call a nil value'
here is an image of the code https://prnt.sc/L266LJR4902J
cheers

Lightshot

Captured with Lightshot

shut hearth
#

that's because RunCommand doesn't exist under the server table; it's supposed to be server.Admin.RunCommand

pearl quest
#

As long as what have Expertcoderz said, too.

pearl quest
#

put an argument in the function brackets lets say Vargs, then define the server variable as Vargs.server.

light perch
#

Okay cheers I’ll try it when I’m home

shut hearth
#

otherwise the error message would be "attempt to index nil with RunCommand" instead of "attempt to call a nil value" as in this case

light perch
#

I’ll try the server.Admin.RunCommand when home

#

Cheers

light perch
#

Changed my code to this, and added server.Admin.RunCommand as suggested and it doesnt error anymore but it just does nothing. no message appears and no errors or anything in the output

pearl quest
light perch
#

It works