Soccerjam problems
Hi there,
so i got a soccerjam plugin
and it gives me these errrors
Code:
L 06/29/2014 - 01:34:10: [AMXX] Displaying debug trace (plugin "soccerjam_test_22.amxx")
L 06/29/2014 - 01:34:10: [AMXX] Run time error 4: index out of bounds
L 06/29/2014 - 01:34:10: [AMXX] [0] soccerjam_test_22.sma::DO_MODE_PREGAME (line 1255)
L 06/29/2014 - 01:34:10: [AMXX] [1] soccerjam_test_22.sma::statusDisplay (line 1107)
L 06/29/2014 - 01:30:17: [AMXX] Displaying debug trace (plugin "soccerjam_test_22.amxx")
L 06/29/2014 - 01:30:17: [AMXX] Run time error 10: native error (native "client_print")
L 06/29/2014 - 01:30:17: [AMXX] [0] soccerjam_test_22.sma::join_team (line 683)
L 06/29/2014 - 01:30:17: [AMXX] [1] soccerjam_test_22.sma::team_select (line 633)
and these are the lines
First i got a define : then :
Code:
public statusDisplay()
{
new id, team
if(GAME_MODE != MODE_SHOOTOUT) {
for(id=1; id<=maxplayers; id++) {
if(is_user_connected(id) && !is_user_bot(id)) {
if(!is_user_alive(id) && !is_dead[id]) {
team = get_user_team(id)
if(team == 1 || team == 2) {
remove_task(id+1000)
has_knife[id] = false;
is_dead[id] = true
//new Float:respawntime = get_cvar_float("kickball_respawn")
set_task(2.0,"AutoRespawn",id)
set_task(2.2, "AutoRespawn2",id)
}
}
}
}
}
switch(GAME_MODE)
{
case MODE_PREGAME: DO_MODE_PREGAME(); // Line 1107
case MODE_HALFTIME: DO_MODE_PREGAME();
case MODE_GAME:
then
Code:
new teamready[TEAMS][512], teamLen[TEAMS], id, team
new player_name[32], teamcount[TEAMS], readycount[TEAMS]
for(id = 1; id<=maxplayers; id++)
{
if(is_user_connected(id) && !is_user_bot(id)) {
team = get_user_team(id)
get_user_name(id, player_name, 31)
teamcount[team]++ //Line 1255
if(Ready[id]) {
readycount[team]++
teamLen[team] += format(teamready[team][teamLen[team]], 511-teamLen[team], "(READY) %s^n", player_name)
}
else {
teamLen[team] += format(teamready[team][teamLen[team]], 511-teamLen[team], "(WAITING) %s^n", player_name)
}
}
}
now let's go to the other lines
Code:
bool:join_team(id, key=-1)
{
if(key == 4)
{
client_print(id, print_chat, "Please choose a team manually!")
return true;
}
new num, players[32]
get_players(players, num, "c");
if(GAME_MODE == MODE_PREGAME && (key == 0 || key == 1))
{
new id, team
new teamcnt[3]
new sjplayers = get_pcvar_num(P_PLAYERS);
for(id=1;id<=maxplayers;id++)
if(is_user_connected(id))
{
team = get_user_team(id);
teamcnt[team]++;
}
if(teamcnt[key+1] >= sjplayers)
{
client_print(id, print_chat, "%s team is full.", key==0?"Terrorist" : "Counter-Terrorists" );//Line 683
return true;
}
}
and
Code:
public team_select(id, key) {
if (key==0 || key==1 || key==4)
if(join_team(id, key)) //Line 633
return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
can any1 help me ?
|