02.09.2012, 17:04
Код:
C:\Users\ники\Desktop\gangwars.pwn(5481) : error 017: undefined symbol "LoadVehicles" C:\Users\ники\Desktop\gangwars.pwn(5483) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\ники\Desktop\gangwars.pwn(5547) : error 017: undefined symbol "SaveVehicle" C:\Users\ники\Desktop\gangwars.pwn(5550) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5552) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5553) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5554) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5557) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5558) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5559) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5560) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5561) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5562) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5582) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5585) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5590) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5596) : error 017: undefined symbol "UpdateVehicle" C:\Users\ники\Desktop\gangwars.pwn(5598) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5600) : error 017: undefined symbol "removeold" C:\Users\ники\Desktop\gangwars.pwn(5603) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5605) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5608) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5609) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5611) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5612) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5617) : error 017: undefined symbol "vehicleid" C:\Users\ники\Desktop\gangwars.pwn(5620) : error 017: undefined symbol "vehicleid" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
Код:
//===================================[Load]======================================================= LoadVehicles() { new string[64]; new File:handle, count; new filename[64], line[256], s, key[64]; for(new i=1; i < MAX_DVEHICLES; i++) { format(filename, sizeof(filename), VEHICLE_FILE_PATH "v%d.ini", i); if(!fexist(filename)) continue; handle = fopen(filename, io_read); while(fread(handle, line)) { StripNL(line); s = strfind(line, "="); if(!line[0] || s < 1) continue; strmid(key, line, 0, s++); if(strcmp(key, "Created") == 0) VehicleCreated[i] = strval(line[s]); else if(strcmp(key, "Model") == 0) VehicleModel[i] = strval(line[s]); else if(strcmp(key, "Pos") == 0) sscanf(line[s], "p,ffff", VehiclePos[i][0], VehiclePos[i][1], VehiclePos[i][2], VehiclePos[i][3]); else if(strcmp(key, "Colors") == 0) sscanf(line[s], "p,dd", VehicleColor[i][0], VehicleColor[i][1]); else if(strcmp(key, "Interior") == 0) VehicleInterior[i] = strval(line[s]); else if(strcmp(key, "VirtualWorld") == 0) VehicleWorld[i] = strval(line[s]); else if(strcmp(key, "Owner") == 0) strmid(VehicleOwner[i], line, s, sizeof(line)); else if(strcmp(key, "NumberPlate") == 0) strmid(VehicleNumberPlate[i], line, s, sizeof(line)); else if(strcmp(key, "Value") == 0) VehicleValue[i] = strval(line[s]); /*else if(strcmp(key, "Trunk1") == 0) sscanf(line[s], "p,dd", VehicleTrunk[i][0][0], VehicleTrunk[i][0][1]); else if(strcmp(key, "Trunk2") == 0) sscanf(line[s], "p,dd", VehicleTrunk[i][1][0], VehicleTrunk[i][1][1]); else if(strcmp(key, "Trunk3") == 0) sscanf(line[s], "p,dd", VehicleTrunk[i][2][0], VehicleTrunk[i][2][1]); else if(strcmp(key, "Trunk4") == 0) sscanf(line[s], "p,dd", VehicleTrunk[i][3][0], VehicleTrunk[i][3][1]); else if(strcmp(key, "Trunk5") == 0) sscanf(line[s], "p,dd", VehicleTrunk[i][4][0], VehicleTrunk[i][4][1]); else if(strcmp(key, "Mod0") == 0) VehicleMods[i][0] = strval(line[s]); else if(strcmp(key, "Mod1") == 0) VehicleMods[i][1] = strval(line[s]); else if(strcmp(key, "Mod2") == 0) VehicleMods[i][2] = strval(line[s]); else if(strcmp(key, "Mod3") == 0) VehicleMods[i][3] = strval(line[s]); else if(strcmp(key, "Mod4") == 0) VehicleMods[i][4] = strval(line[s]); else if(strcmp(key, "Mod5") == 0) VehicleMods[i][5] = strval(line[s]); else if(strcmp(key, "Mod6") == 0) VehicleMods[i][6] = strval(line[s]); else if(strcmp(key, "Mod7") == 0) VehicleMods[i][7] = strval(line[s]); else if(strcmp(key, "Mod8") == 0) VehicleMods[i][8] = strval(line[s]); else if(strcmp(key, "Mod9") == 0) VehicleMods[i][9] = strval(line[s]); else if(strcmp(key, "Mod10") == 0) VehicleMods[i][10] = strval(line[s]); else if(strcmp(key, "Mod11") == 0) VehicleMods[i][11] = strval(line[s]); else if(strcmp(key, "Mod12") == 0) VehicleMods[i][12] = strval(line[s]); else if(strcmp(key, "Mod13") == 0) VehicleMods[i][13] = strval(line[s]);*/ else if(strcmp(key, "Paintjob") == 0) VehiclePaintjob[i] = strval(line[s]); else { for(new t=0; t < sizeof(VehicleTrunk[]); t++) { format(string, sizeof(string), "Trunk%d", t+1); if(strcmp(key, string) == 0) sscanf(line[s], "p,dd", VehicleTrunk[i][t][0], VehicleTrunk[i][t][1]); } for(new m=0; m < sizeof(VehicleMods[]); m++) { format(string, sizeof(string), "Mod%d", m); if(strcmp(key, string) == 0) VehicleMods[i][m] = strval(line[s]); } } } fclose(handle); if(VehicleCreated[i]) count++; } printf(" Loaded %d vehicles", count); } SaveVehicle(vehicleid) { new filename[64], line[256]; format(filename, sizeof(filename), VEHICLE_FILE_PATH "v%d.ini", vehicleid); new File:handle = fopen(filename, io_write); format(line, sizeof(line), "Created=%d\r\n", VehicleCreated[vehicleid]); fwrite(handle, line); format(line, sizeof(line), "Model=%d\r\n", VehicleModel[vehicleid]); fwrite(handle, line); format(line, sizeof(line), "Pos=%.3f,%.3f,%.3f,%.3f\r\n", VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2], VehiclePos[vehicleid][3]); fwrite(handle, line); format(line, sizeof(line), "Colors=%d,%d\r\n", VehicleColor[vehicleid][0], VehicleColor[vehicleid][1]); fwrite(handle, line); format(line, sizeof(line), "Interior=%d\r\n", VehicleInterior[vehicleid]); fwrite(handle, line); format(line, sizeof(line), "VirtualWorld=%d\r\n", VehicleWorld[vehicleid]); fwrite(handle, line); format(line, sizeof(line), "Owner=%s\r\n", VehicleOwner[vehicleid]); fwrite(handle, line); format(line, sizeof(line), "NumberPlate=%s\r\n", VehicleNumberPlate[vehicleid]); fwrite(handle, line); format(line, sizeof(line), "Value=%d\r\n", VehicleValue[vehicleid]); fwrite(handle, line); /*format(line, sizeof(line), "Trunk1=%d,%d\r\n", VehicleTrunk[vehicleid][0][0], VehicleTrunk[vehicleid][0][1]); fwrite(handle, line); format(line, sizeof(line), "Trunk2=%d,%d\r\n", VehicleTrunk[vehicleid][1][0], VehicleTrunk[vehicleid][1][1]); fwrite(handle, line); format(line, sizeof(line), "Trunk3=%d,%d\r\n", VehicleTrunk[vehicleid][2][0], VehicleTrunk[vehicleid][2][1]); fwrite(handle, line); format(line, sizeof(line), "Trunk4=%d,%d\r\n", VehicleTrunk[vehicleid][3][0], VehicleTrunk[vehicleid][3][1]); fwrite(handle, line); format(line, sizeof(line), "Trunk5=%d,%d\r\n", VehicleTrunk[vehicleid][4][0], VehicleTrunk[vehicleid][4][1]); fwrite(handle, line); format(line, sizeof(line), "Mod0=%d\r\n", VehicleMods[vehicleid][0]); fwrite(handle, line); format(line, sizeof(line), "Mod1=%d\r\n", VehicleMods[vehicleid][1]); fwrite(handle, line); format(line, sizeof(line), "Mod2=%d\r\n", VehicleMods[vehicleid][2]); fwrite(handle, line); format(line, sizeof(line), "Mod3=%d\r\n", VehicleMods[vehicleid][3]); fwrite(handle, line); format(line, sizeof(line), "Mod4=%d\r\n", VehicleMods[vehicleid][4]); fwrite(handle, line); format(line, sizeof(line), "Mod5=%d\r\n", VehicleMods[vehicleid][5]); fwrite(handle, line); format(line, sizeof(line), "Mod6=%d\r\n", VehicleMods[vehicleid][6]); fwrite(handle, line); format(line, sizeof(line), "Mod7=%d\r\n", VehicleMods[vehicleid][7]); fwrite(handle, line); format(line, sizeof(line), "Mod8=%d\r\n", VehicleMods[vehicleid][8]); fwrite(handle, line); format(line, sizeof(line), "Mod9=%d\r\n", VehicleMods[vehicleid][9]); fwrite(handle, line); format(line, sizeof(line), "Mod10=%d\r\n", VehicleMods[vehicleid][10]); fwrite(handle, line); format(line, sizeof(line), "Mod11=%d\r\n", VehicleMods[vehicleid][11]); fwrite(handle, line); format(line, sizeof(line), "Mod12=%d\r\n", VehicleMods[vehicleid][12]); fwrite(handle, line); format(line, sizeof(line), "Mod13=%d\r\n", VehicleMods[vehicleid][13]); fwrite(handle, line);*/ format(line, sizeof(line), "Paintjob=%d\r\n", VehiclePaintjob[vehicleid]); fwrite(handle, line); for(new t=0; t < sizeof(VehicleTrunk[]); t++) { format(line, sizeof(line), "Trunk%d=%d,%d\r\n", t+1, VehicleTrunk[vehicleid][t][0], VehicleTrunk[vehicleid][t][1]); fwrite(handle, line); } for(new m=0; m < sizeof(VehicleMods[]); m++) { format(line, sizeof(line), "Mod%d=%d\r\n", m, VehicleMods[vehicleid][m]); fwrite(handle, line); } fclose(handle); } UpdateVehicle(vehicleid, removeold) { if(VehicleCreated[vehicleid]) { if(removeold) { new Float:health; GetVehicleHealth(VehicleID[vehicleid], health); new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(VehicleID[vehicleid], engine, lights, alarm, doors, bonnet, boot, objective); //new panels, doorsd, lightsd, tires; //GetVehicleDamageStatus(VehicleID[vehicleid], panels, doorsd, lightsd, tires); DestroyVehicle(VehicleID[vehicleid]); VehicleID[vehicleid] = CreateVehicle(VehicleModel[vehicleid], VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2], VehiclePos[vehicleid][3], VehicleColor[vehicleid][0], VehicleColor[vehicleid][1], 3600); SetVehicleHealth(VehicleID[vehicleid], health); SetVehicleParamsEx(VehicleID[vehicleid], engine, lights, alarm, doors, bonnet, boot, objective); //UpdateVehicleDamageStatus(VehicleID[vehicleid], panels, doorsd, lightsd, tires); } else { VehicleID[vehicleid] = CreateVehicle(VehicleModel[vehicleid], VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2], VehiclePos[vehicleid][3], VehicleColor[vehicleid][0], VehicleColor[vehicleid][1], 3600); } LinkVehicleToInterior(VehicleID[vehicleid], VehicleInterior[vehicleid]); SetVehicleVirtualWorld(VehicleID[vehicleid], VehicleWorld[vehicleid]); SetVehicleNumberPlate(VehicleID[vehicleid], VehicleNumberPlate[vehicleid]); for(new i=0; i < sizeof(VehicleMods[]); i++) { AddVehicleComponent(VehicleID[vehicleid], VehicleMods[vehicleid][i]); } ChangeVehiclePaintjob(VehicleID[vehicleid], VehiclePaintjob[vehicleid]); UpdateVehicleLabel(vehicleid, removeold); } }