Сompiler Error Класс зомби

adamantov

Пользователь
Регистрация
12 Сен 2017
Сообщения
61
Симпатии
-54
Amx Mod X
AMXX 1.8.3
Ошибка
Код:
error 021,001,029
Исходник
Код:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <fun>
#include <engine>
#include <hamsandwich>
#include <cstrike>

// Zombie Attributes
new const zclass_name[] = "Классик" // name
new const zclass_info[] = "\y[Баланс]" // description
new const zclass_model[] = "az_classic" // model
new const zclass_clawmodel[] = "v_claws_classic.mdl" // claw model
new KNOCKBOMB_HEALER[] = "models/zombie_plague/stb_zn_zombie/v_bomb_classic.mdl"
const zclass_health = 4500 // health
const zclass_speed = 258 // speed
const Float:zclass_gravity = 0.75 // gravity
const Float:zclass_knockback = 0.8 // knockback

// Class IDs
new g_zclassid1
new Array:sounds;
new const infect[2][] =
{
"zombie_plague/bos93_zombie/classic/infect_011.wav",
"zombie_plague/bos93_zombie/classic/infect_021.wav"
};
new const pain[2][] =
{
"zombie_plague/bos93_zombie/classic/pain_011.wav",
"zombie_plague/bos93_zombie/classic/pain_021.wav"
};
new const die[2][] =
{
"zombie_plague/bos93_zombie/classic/die_02.wav",
"zombie_plague/bos93_zombie/classic/die_03.wav"
};
new const fall[1][] =
{
"zombie_plague/bos93_zombie/all/zombie_fall1.wav"
};
new const miss_slash[2][] =
{
"zombie_plague/bos93_zombie/all/miss_slash_01.wav",
"zombie_plague/bos93_zombie/all/miss_slash_02.wav"
};
new const miss_wall[2][] =
{
"zombie_plague/bos93_zombie/all/miss_wall_01.wav",
"zombie_plague/bos93_zombie/all/miss_wall_02.wav"
};
new const hit_normal[2][] =
{
"zombie_plague/bos93_zombie/fast/hit_normal_01.wav",
"zombie_plague/bos93_zombie/fast/hit_normal_02.wav"
};
new const hit_stab[1][] =
{
"zombie_plague/bos93_zombie/fast/hit_normal_01.wav"
};
new const idle[1][] =
{
"zombie_plague/bos93_zombie/classic/idle_011.wav"
};
new const idle_last[1][] =
{
"zombie_plague/bos93_zombie/classic/idle_011.wav"
};
new const madness[1][] =
{
"zombie_plague/bos93_zombie/all/zombie_madness1.wav"
};
new const grenade[2][] =
{
"zombie_plague/bos93_zombie/all/zombie_burn1.wav",
"zombie_plague/bos93_zombie/all/zombie_burn2.wav"
};
new const infect_adv[2][] =
{
"zombie_plague/bos93_zombie/zombi_comeback.wav",
"zombie_plague/bos93_zombie/zombi_coming_1.wav"
};

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Classic Zombie", "1.0", "dias")

// Register the new class and store ID for reference
g_zclassid1 = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
precache_model(KNOCKBOMB_HEALER)
sounds = ArrayCreate(13, 1);
new i = 0;
while (i < 13)
{
ArrayPushCell(sounds, ArrayCreate(64, 1));
i++;
}
new i = 0;
while (i < 2)
{
ArrayPushString(ArrayGetCell(sounds, 0), infect[0][0]);
i++;
}
new i = 0;
while (i < 2)
{
ArrayPushString(ArrayGetCell(sounds, 1), pain[0][0]);
i++;
}
new i = 0;
while (i < 2)
{
ArrayPushString(ArrayGetCell(sounds, 2), die[0][0]);
i++;
}
new i = 0;
while (i < 1)
{
ArrayPushString(ArrayGetCell(sounds, 3), fall[0][0]);
i++;
}
new i = 0;
while (i < 2)
{
ArrayPushString(ArrayGetCell(sounds, 4), miss_slash[0][0]);
i++;
}
new i = 0;
while (i < 2)
{
ArrayPushString(ArrayGetCell(sounds, 5), miss_wall[0][0]);
i++;
}
new i = 0;
while (i < 2)
{
ArrayPushString(ArrayGetCell(sounds, 6), hit_normal[0][0]);
i++;
}
new i = 0;
while (i < 1)
{
ArrayPushString(ArrayGetCell(sounds, 7), hit_stab[0][0]);
i++;
}
new i = 0;
while (i < 1)
{
ArrayPushString(ArrayGetCell(sounds, 8), idle[0][0]);
i++;
}
new i = 0;
while (i < 1)
{
ArrayPushString(ArrayGetCell(sounds, 9), idle_last[0][0]);
i++;
}
new i = 0;
while (i < 1)
{
ArrayPushString(ArrayGetCell(sounds, 10), madness[0][0]);
i++;
}
new i = 0;
while (i < 2)
{
ArrayPushString(ArrayGetCell(sounds, 12), infect_adv[0][0]);
i++;
}
return 0;
}

// User Infected forward
public zp_user_infected_post(id, infector)
{
// Check if the infected player is using our custom zombie class
if (zp_get_user_zombie_class(id) == g_zclassid1 && !zp_get_user_nemesis(id))
{
print(id, "^x04[ZP]^x01 Ваш зомби класс: ^x04Классик^x01")
set_pev(id, pev_health, float(pev(id, pev_health)) + 100.0)
}
}

stock print(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]

static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)

replace_all(szMsg, 190, "^x04", "^4") // green txt
replace_all(szMsg, 190, "^x01", "^1") // orange txt
replace_all(szMsg, 190, "^x03", "^3") // team txt
replace_all(szMsg, 190, "^x00", "^0") // team txt

if(id) iPlayers[0] = id
else get_players(iPlayers, iCount, "ch")

for (new i = 0; i < iCount; i++)
{
if (is_user_connected(iPlayers))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers)
write_byte(iPlayers)
write_string(szMsg)
message_end()
}
}
}
Помогите исправить error.
 

Вложения

Flymic24

Пользователь
Регистрация
15 Июн 2017
Сообщения
85
Симпатии
43
Пол
Мужской
1. Лишний раз создаёшь одну и туже переменную:
new i = 0; --> i = 0;

2. Массив grenade, так нигде и не используется
3. При записи данных в массив вида:
infect[i][0][0] -- > infect[i][0]
 

adamantov

Пользователь
Регистрация
12 Сен 2017
Сообщения
61
Симпатии
-54
1. Лишний раз создаёшь одну и туже переменную:
new i = 0; --> i = 0;

2. Массив grenade, так нигде и не используется
3. При записи данных в массив вида:
infect[i][0][0] -- > infect[i][0]
Не работает как ты написал.[DOUBLEPOST=1549745019][/DOUBLEPOST]
1. Лишний раз создаёшь одну и туже переменную:
new i = 0; --> i = 0;

2. Массив grenade, так нигде и не используется
3. При записи данных в массив вида:
infect[i][0][0] -- > infect[i][0]
А не вроде вот так?
Код:
    new i = 0;
    while (i < 13)
    {
        ArrayPushCell(sounds, ArrayCreate(64, 1));
        i++;
    }
    while (i < 2)
    {
        ArrayPushString(ArrayGetCell(sounds, 0), infect[i][0]);
        i++;
    }
    while (i < 2)
    {
        ArrayPushString(ArrayGetCell(sounds, 1), pain[i][0]);
        i++;
    }
    while (i < 2)
    {
        ArrayPushString(ArrayGetCell(sounds, 2), die[i][0]);
        i++;
    }
    while (i < 1)
    {
        ArrayPushString(ArrayGetCell(sounds, 3), fall[i][0]);
        i++;
    }
    while (i < 2)
    {
        ArrayPushString(ArrayGetCell(sounds, 4), miss_slash[i][0]);
        i++;
    }
    while (i < 2)
    {
        ArrayPushString(ArrayGetCell(sounds, 5), miss_wall[i][0]);
        i++;
    }
    while (i < 2)
    {
        ArrayPushString(ArrayGetCell(sounds, 6), hit_normal[i][0]);
        i++;
    }
    while (i < 1)
    {
        ArrayPushString(ArrayGetCell(sounds, 7), hit_stab[i][0]);
        i++;
    }
    while (i < 1)
    {
        ArrayPushString(ArrayGetCell(sounds, 8), idle[i][0]);
        i++;
    }
    while (i < 1)
    {
        ArrayPushString(ArrayGetCell(sounds, 9), idle_last[i][0]);
        i++;
    }
    while (i < 1)
    {
        ArrayPushString(ArrayGetCell(sounds, 10), madness[i][0]);
        i++;
    }
    while (i < 2)
    {
        ArrayPushString(ArrayGetCell(sounds, 12), infect_adv[i][0]);
        i++;
    }
    return 0;
}
 
Сверху Снизу