13.09.2009, 08:44
Here is the JoinPed thingy:
here's the OnPlayerText too
These are the errors
Can someone help me clear those errors out?
Код:
new JoinPed[47][1] = { {280},//Sheriff's Department {281}, {282}, {283}, {284}, {285}, {288}, {71}, {166}, {295}, {148}, {286},//FBI/ATF {164}, {163}, {287},//NATIONAL_GUARD {285}, {70},//FIRE/AMBULANCE {274}, {275}, {276}, {277}, {278}, {279}, {100},//Biker's Gang {247}, {248}, {254}, {190}, {28}, {117},//YAKUZA {118}, {120}, {294}, {123}, {169}, {193}, {127},//HITMANS {165}, {186}, {93}, {141}, {148},//NEWS_REPORTERS {188}, {187}, {255},//TAXI_CAB_COMPANY {253}, {59},//DRIVING/FLYING_SCHOOL {60}//DRIVING/FLYING_SCHOOL };
Код:
public OnPlayerText(playerid, text[]) { new giver[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new tmp[256]; new string[256]; new giveplayerid; if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced"); return 0; } if(SelectChar[playerid] == 255) { new idx; tmp = strtok(text, idx); if ((strcmp("next", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("next"))) { switch (SelectCharID[playerid]) { case 1: //Police Force { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[0][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[1][0]; } else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[2][0]; } else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[3][0]; } else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[4][0]; } else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[5][0]; } else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 8; ChosenSkin[playerid] = JoinPed[6][0]; } else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 9; ChosenSkin[playerid] = JoinPed[7][0]; } else if(SelectCharPlace[playerid] == 9) { SetPlayerSkin(playerid, JoinPed[8][0]); SelectCharPlace[playerid] = 10; ChosenSkin[playerid] = JoinPed[8][0]; } else if(SelectCharPlace[playerid] == 10) { SetPlayerSkin(playerid, JoinPed[9][0]); SelectCharPlace[playerid] = 11; ChosenSkin[playerid] = JoinPed[9][0]; } else if(SelectCharPlace[playerid] == 11) { SetPlayerSkin(playerid, JoinPed[10][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[10][0]; } } case 2: //FBI/ATF { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[11][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[11][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[12][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[12][0]; } else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[13][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[13][0]; } } case 3: //National Guard { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[14][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[14][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[15][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[15][0]; } } case 4: //Fire&Ambulance { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[16][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[16][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[17][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[17][0]; } else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[18][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[18][0]; } else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[19][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[19][0]; } else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[20][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[20][0]; } else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[21][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[21][0]; } else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[22][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[22][0]; } } case 5: //Biker's Gang { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[23][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[23][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[24][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[24][0]; } else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[25][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[25][0]; } else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[26][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[26][0]; } else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[27][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[27][0]; } else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[28][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[28][0]; } } case 6: //Yakuza { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[29][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[29][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[30][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[30][0]; } else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[31][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[31][0]; } else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[32][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[32][0]; } else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[33][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[33][0]; } else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[34][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[34][0]; } else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[35][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[35][0]; } } case 8: //Hitman Agency { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[36][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[36][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[37][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[37][0]; } else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[38][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[38][0]; } else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[39][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[39][0]; } else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[40][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[40][0]; } } case 9: //News Reporters { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[41][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[41][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[42][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[42][0]; } else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[43][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[43][0]; } } case 10: //Taxi Cab Company { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[44][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[44][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[45][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[45][0]; } } case 11: //Driving/Flying School { if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[46][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[46][0]; } else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[47][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[47][0]; } } } return 0; }
These are the errors
Код:
C:\Documents and Settings\Alex\Рабочий стол\West City RolePlay\gamemodes\gf.pwn(1121) : error 018: initialization data exceeds declared size C:\Documents and Settings\Alex\Рабочий стол\West City RolePlay\gamemodes\gf.pwn(1123) : error 010: invalid function or declaration C:\Documents and Settings\Alex\Рабочий стол\West City RolePlay\gamemodes\gf.pwn(26914) : error 032: array index out of bounds (variable "JoinPed") C:\Documents and Settings\Alex\Рабочий стол\West City RolePlay\gamemodes\gf.pwn(26914) : error 032: array index out of bounds (variable "JoinPed") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.