12.11.2012, 12:11
Still having them
This is the part
Код:
C:\Documents and Settings\User\Desktop\xx\xxx.pwn(825) : error 008: must be a constant expression; assumed zero C:\Documents and Settings\User\Desktop\New Folder\xx\xxx.pwn(825) : error 009: invalid array size (negative, zero or out of bounds)
Код:
forward UpdateSpeed(playerid); enum SavePlayerPosEnum { Float:LastX, Float:LastY, Float:LastZ } public UpdateSpeed(playerid) { new Float:x,Float:y,Float:z; new Float:distance,value; for(new i=0; i<SLOTS; i++) { if(IsPlayerConnected(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)); // Distance: meters in the last second value = floatround(distance * 3600); if(UpdateSeconds > 1) { value = floatround(value / UpdateSeconds); } distance1[i] = floatround(value/1600); SavePlayerPos[i][LastX] = x; SavePlayerPos[i][LastY] = y; SavePlayerPos[i][LastZ] = z;