03.04.2010, 20:06
People, please help me with a script.
I have some errors.
This is the script:
These are errors;
Hope, you'll help me.
I have some errors.
This is the script:
Код:
public CheckSpeed(playerid) { new Float:x,Float:y,Float:z; new Float:distance,value; new i = playerid; if(IsPlayerConnected(i)) { if(IsPlayerInAnyVehicle(i)) { new VID; VID = GetPlayerVehicleID(i); GetPlayerPos(i, x, y, z); distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2)); value = floatround(distance * 5000); if(UpdateSeconds > 1) { value = floatround(value / UpdateSeconds); } if(SpeedMode) { } if(value == 0) { ChGas[i]++;//(50691 строка)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< if(ChGas[i]>=30) { Gas[VID]++;ChGas[i]=0; } } SavePlayerPos[i][LastX] = x; SavePlayerPos[i][LastY] = y; SavePlayerPos[i][LastZ] = z; } } value = floatround(value/1000); new v = value; return v; }
Код:
C:\школа\SFRP4.pwn(50691) : error 017: undefined symbol "ChGas" C:\школа\SFRP4.pwn(50691) : warning 215: expression has no effect C:\школа\SFRP4.pwn(50691) : error 001: expected token: ";", but found "]" C:\школа\SFRP4.pwn(50691) : error 029: invalid expression, assumed zero