21.08.2010, 20:29
I got the same errorS!! Please somebody can help me here? ='(
Here's the script:
Code:
C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(14) : error 001: expected token: "-identifier-", but found "-integer value-" C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(47) : warning 213: tag mismatch C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(47) : error 032: array index out of bounds (variable "Cars") C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(48) : warning 213: tag mismatch C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(48) : error 032: array index out of bounds (variable "Cars") C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(49) : warning 213: tag mismatch C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(49) : error 032: array index out of bounds (variable "Cars") C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(50) : warning 213: tag mismatch C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(50) : error 032: array index out of bounds (variable "Cars") C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(702) : warning 213: tag mismatch C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Servidor - Teste\pawno\Driftv2.pwn(702) : error 032: array index out of bounds (variable "Cars") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
Code:
#include <a_samp> #include <core> #define SPECIAL_ACTION_PISSING 68 #define MAX_INVALID_NOS_VEHICLES 29 #define DOD 1 #define DOD_COLOUR 0x00820FAA #define COLOR_RED 0xFF0000AA enum TeamCars { DOD } new Cars[TeamCars]; new gTeam[MAX_PLAYERS]; new ELEGY; new ELEGY2; new ELEGY3; new JESTER; new JESTER2; new STRATUM; new STRATUM2; new STRATUM3; new STRATUM4; new TE1; forward NitroReset(); main() { print("\n __________________________________\n"); print("\n| Drift |\n"); print("\n|__________________________________|\n"); } public OnGameModeInit() { SetGameModeText("Drift"); UsePlayerPedAnims(); SetTimer("NitroReset", 1500, 1); //Funзхes para Spawn de Members - DOD AddPlayerClass(299,2497.2693,-1676.9578,13.3398,23.6501,0,0,0,0,0,0); AddPlayerClass(104,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); Cars[DOD] = CreateVehicle(562,-2506.870117, -635.783325, 134.652481, 359.465423, -1, -1, 10000); Cars[DOD] = CreateVehicle(429,-2494.236083, -633.563049, 134.012542, 359.016265, -1, -1, 10000); Cars[DOD] = CreateVehicle(507,-2530.7561,-618.6442,132.1928,269.1777,1,1); Cars[DOD] = CreateVehicle(436,-2529.5754,-606.6457,132.1944,270.8741,1,1); return 1; } public OnGameModeExit() { return 1; } public OnPlayerUpdate(playerid) { SetPlayerScore(playerid, GetPlayerMoney(playerid)); return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerTeamFromClass(playerid, classid); return 1; } public NitroReset() { for(new i = 0; i<MAX_PLAYERS; i++) { if(!IsPlayerInInvalidNosVehicle(i,GetPlayerVehicleID(i))) { new vehicle = GetPlayerVehicleID(i); AddVehicleComponent(vehicle, 1010); } } } IsPlayerInInvalidNosVehicle(playerid,vehicleid) { new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] = { 581,523,462,521,463,522,461,448,468,586, 509,481,510,472,473,493,595,484,430,453, 452,446,454,590,569,537,538,570,449 }; vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid,vehicleid)) { for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++) { if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]) { return true; } } } return false; } public OnPlayerConnect(playerid) { GivePlayerMoney(playerid, 0); new pName[30], string[128]; GetPlayerName(playerid, pName, 30); format(string, 256, "%s entrou no server.", pName); SendClientMessageToAll(0x33AA33AA,string); SendClientMessage(playerid, 0x33CCFFAA, "Se bem Vindo ao Servidor de Drift Nacional!"); SendClientMessage(playerid, 0x33CCFFAA, "[DOD] - Drift Or Die"); SendClientMessage(playerid, 0x33CCFFAA, "Escreve /cmd para aprenderes alguns comandos!"); return 1; } public OnPlayerDisconnect(playerid, reason) { new pName[30], string[128]; GetPlayerName(playerid, pName, 30); format(string, 256, "%s saiu do server.", pName); SendClientMessageToAll(0xA52A2AAA,string); return 1; } public OnPlayerSpawn(playerid) { SetPlayerHealth(playerid,9000.0); SetPlayerToTeamColour(playerid); return 1; } SetPlayerTeamFromClass(playerid, classid) { if(classid == 0) { gTeam[playerid] = DOD; } } SetPlayerToTeamColour(playerid) { if(gTeam[playerid] == DOD) { SetPlayerColor(playerid,DOD_COLOUR); //Green } } public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 2) { new CarCheck = GetPlayerVehicleID(playerid); if(CarCheck == Cars[DOD] ) { if(gTeam[playerid] != 1) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "You Don't Belong to DOD Crew!"); return 1; } } return 1; } return 1; }