复制程式
public client_connect(id) {
if (!is_user_bot(id)) {
rectime = get_cvar_float("minrec")
new userip[21+1]
new uname[33+1]
get_user_ip(id, userip, 21, 0)
get_user_name(id, uname, 33)
client_cmd(id, "bind m rules")
for(new i = 1; i <= MAX_PLAYERS; i++) {
if (equal(userip, pip[i], 21)) {
new userid[1]
userid[0] = get_user_userid(id)
if (!(get_user_flags(id)&ADMIN_IMMUNITY)) {
set_task(1.0,"delayed_kick",0,userid,1)
}
return PLUGIN_CONTINUE
}
}
}
return PLUGIN_CONTINUE
}
这段代码中提示了if (equal(userip, pip
, 21)) 这句超出数组界限,到底怎么回事?