Porque pasa esto D:
#1

Estas dos lineas son el problema:
pawn Код:
TempTime[3];
pawn Код:
ConvertTime(var1, TempTotalTime, TempTime[0], TempTime[1], TempTime[2]);
Cuando pongo esto:
pawn Код:
TempTime[20];
Me salen estos errores:

pawn Код:
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2764) : warning 219: local variable "TimeStamp" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2768) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2840) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2873) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2889) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2905) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2920) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2934) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2954) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2979) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3015) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3030) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3046) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3065) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3097) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3113) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3129) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(3145) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(4112) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(4629) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(4646) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(4665) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(4978) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5083) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5164) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5255) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5297) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5299) : warning 204: symbol is assigned a value that is never used: "string"
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5334) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5381) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5426) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5529) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5554) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5618) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5643) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5667) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5701) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5740) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5811) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(5949) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6165) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6213) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6279) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6313) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6339) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6729) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6810) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6838) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6857) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(6871) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(7503) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(7895) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(10974) : warning 219: local variable "string2" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(14230) : error 021: symbol already defined: "IsValidVehicle"
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(14232) : error 010: invalid function or declaration
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(14233) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Cuando lo pongo asн:
[pawn]
pawn Код:
TempTime;
Me sale esto:
pawn Код:
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2764) : warning 219: local variable "TimeStamp" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2768) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2803) : error 028: invalid subscript (not an array or too many subscripts): "TempTime"
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2803) : warning 215: expression has no effect
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2803) : error 001: expected token: ";", but found "]"
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2803) : error 029: invalid expression, assumed zero
C:\Users\win1\Desktop\Downloads\Ladmin6.2.pwn(2803) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
ESTO ES TODO:
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(CPProgess[playerid] == TotalCP -1)
{
new TimeStamp,
TotalRaceTime,
string[256],
rFile[256],
pName[MAX_PLAYERS],
rTime[3],
Prize[2],
TempTotalTime,
TempTime[2];

Position++;
GetPlayerName(playerid, pName, sizeof(pName));
TimeStamp = GetTickCount();
TotalRaceTime = TimeStamp - RaceTick;
ConvertTime(var, TotalRaceTime, rTime[0], rTime[1], rTime[2]);
switch(Position)
{
case 1: Prize[0] = (random(random(5000)) + 10000), Prize[1] = 10;
case 2: Prize[0] = (random(random(4500)) + 9000), Prize[1] = 9;
case 3: Prize[0] = (random(random(4000)) + 8000), Prize[1] = 8;
case 4: Prize[0] = (random(random(3500)) + 7000), Prize[1] = 7;
case 5: Prize[0] = (random(random(3000)) + 6000), Prize[1] = 6;
case 6: Prize[0] = (random(random(2500)) + 5000), Prize[1] = 5;
case 7: Prize[0] = (random(random(2000)) + 4000), Prize[1] = 4;
case 8: Prize[0] = (random(random(1500)) + 3000), Prize[1] = 3;
case 9: Prize[0] = (random(random(1000)) + 2000), Prize[1] = 2;
default: Prize[0] = random(random(1000)), Prize[1] = 1;
}
format(string, sizeof(string), ">> {00CCFF}%s {FFFFFF}ha terminado la carrera en la posiciуn {00CCFF}#%d", pName, Position);
SendClientMessageToAll(-1, string);
format(string, sizeof(string), "    - Tiempo: {FFFF00}%d:%d.%d.", rTime[0], rTime[1], rTime[2]);
SendClientMessageToAll(-1, string);
format(string, sizeof(string), "    - Premio: {FFFF00}$%d y +%d Score.", Prize[0], Prize[1]);
SendClientMessageToAll(-1, string);
if(FinishCount <= 5)
{
format(rFile, sizeof(rFile), "/rRaceSystem/%s.RRACE", RaceName);
format(string, sizeof(string), "BestRacerTime_%d", TimeProgress);
TempTotalTime = dini_Int(rFile, string);
ConvertTime(var1, TempTotalTime, TempTime[0], TempTime[1], TempTime[2]);
if(TotalRaceTime <= dini_Int(rFile, string) || TempTotalTime == 0)
{
dini_IntSet(rFile, string, TotalRaceTime);
format(string, sizeof(string), "BestRacer_%d", TimeProgress);
if(TempTotalTime != 0) format(string, sizeof(string), ">> {00CCFF}%s {FFFFFF}ha rompido el record de {00CCFF}%s {FFFFFF}con {00CCFF}%d segundos en la posiciуn {00CCFF}#%d", pName, dini_Get(rFile, string), -(rTime[1] - TempTime[1]), TimeProgress+1);
else format(string, sizeof(string), ">> {00CCFF}%s ha hecho un nuevo record de posiciуn {00CCFF}#%d", pName, TimeProgress+1);
SendClientMessageToAll(-1, "  ");
SendClientMessageToAll(-1, string);
SendClientMessageToAll(-1, "  ");
format(string, sizeof(string), "BestRacer_%d", TimeProgress);
dini_Set(rFile, string, pName);
TimeProgress++;
}
}
FinishCount++;
GivePlayerMoney(playerid, Prize[0]);
SetPlayerScore(playerid, GetPlayerScore(playerid) + Prize[1]);
DisablePlayerRaceCheckpoint(playerid);
CPProgess[playerid]++;
if(FinishCount >= JoinCount) return StopRace();
}
else
{
CPProgess[playerid]++;
CPCoords[CPProgess[playerid]][3]++;
RacePosition[playerid] = floatround(CPCoords[CPProgess[playerid]][3], floatround_floor);
SetCP(playerid, CPProgess[playerid], CPProgess[playerid]+1, TotalCP, RaceType);
new stringxd[400];
format(stringxd, sizeof(stringxd), "~n~~n~~n~~n~~n~~n~~n~~b~~h~~h~checkpoint:~w~ %d/%d",CPProgess[playerid]+1, TotalCP);
GameTextForPlayer(playerid,stringxd,2000,3);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
}
return 1;
}
Reply
#2

Porque tienes esas variables declaradas varias veces, si no es en el gamemode... estarбn en los include.

Tienes que ponerles otros nombres.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)