[Unsolved]A dcmd related problem.
#1

Have a look at this code http://pastebin.com/m57efc894

When I type /rc it says...

1
2


When I type /rc place it says...

1
2


When I type /rc place bandit it says...

1


Wtf? Is anybody able to explain to me why this is happening? And if you have a solution, then please post.
Reply
#2

what are you trying to make?
Reply
#3

Well I prefer to not talk about exactly what I'm making, since I'm a bit paranoid when it comes to people stealing ideas. But basically I wanna make it so it will place a RC Bandit at your location when you type the command /rc place bandit

As you can see I'm using dcmd for the command. But I'm having trouble with checking the parameters. I was wondering if someone had a solution.
Reply
#4

Look the command '/level' of my adminscript, have a good example of what you are wanting!.
Reply
#5

Quote:
Originally Posted by © Tђэ LυxυяiσN™
Look the command '/level' of my adminscript, have a good example of what you are wanting!.
Well thanks for trying to help © Tђэ LυxυяiσN™. But your level command only requires 1 parameter. I want to know how I can do this with multiple parameters.
Reply
#6

Alright. Thanks for the help guys .
Reply
#7

You were checking params[0], which is checking cell 0 for the word "place", seeing as your command is called "rc", include the "/" (slash):

/rc place

"p" starts at 4 cells through, so you'd have to check from 4 (and after) cells. Anyway, sscanf is much more easy to use.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)