Hi
need help with the arguments of a command
first...
****** ****ing arguments ******* ******. this *************** small is n ************ language. ******
ok now lets have a look at the problem
(its n test script....)
Code:
#include <amxmod>
#include <amxmisc>
public plugin_init()
{
register_plugin("test","073","MC-Olivenoel")
register_clcmd("make_test","maketest",0,"make the test")
}
public maketest(id)
{
new varil0
if (read_argc() == 0) {
//no argument ...
console_print(id,"- no argument = same as make_test 0")
varil0 = 0
return PLUGIN_HANDLED
}else{
read_argv(1,varil0,3) //here is the ************* error ??
}
if (varil0 == 0){
//varil0 is 0
client_cmd(id,"say varil0 is 0")
return PLUGIN_HANDLED
}
if (varil0 == 1){
//varil0 is 0
client_cmd(id,"say varil0 is 1")
return PLUGIN_HANDLED
}
if (varil0 == 10){
//varil0 is 0
client_cmd(id,"say varil0 is 10")
return PLUGIN_HANDLED
}
if (varil0 == 200){
//varil0 is 0
client_cmd(id,"say varil0 is 200")
return PLUGIN_HANDLED
}
// here if the argument is wrong
client_cmd(id,"say varil0 is not 0,1,10 or 200")
return PLUGIN_HANDLED
}
ok there are lottttts of errors
Code:
(22) : error 035: argument type mismatch (argument 1)
(29) : warning 217: loose indentation
(35) : warning 217: loose indentation
(41) : warning 217: loose indentation
(47) : warning 217: loose indentation
(52) : warning 217: loose indentation
(54) : warning 217: loose indentation
i want that it works... if i make consol commands
make_test
make_test 0
make_test 1
make_test 10
make_test 20
make_test 100
make_test 200
make_test 1000
can someon tell me how to use the "read_argv" in correckt way _??
cucu