15.03.2018, 12:10
It didn't work, I got few errors.
401:
416:
422:
If i remove your code it complies perfect.
Код:
CMD:fps(playerid, params[]) { new Float:fps = float(drunklvl_difference) / (float(timepassed_in_ms) / 1000.0), target, str[64], PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); fps = GetPlayerDrunkLevel(target); if(fps < 100) { SetPlayerDrunkLevel(target, 2000); } else { if (gDrunkLevelLast[target] != fps) { new gfps = gDrunkLevelLast[playerid] - fps; if ((gfps > 0) && (gfps < 200)) gFPS[target] = gfps; gDrunkLevelLast[playerid] = fps; } } if ( sscanf ( params, "u", target)) target = playerid; format(str,sizeof(str), "SERVER: %s's fps is %d", PlayerName, gFPS[target]); SendClientMessage(playerid, -1, str); return true; }
Код:
C:\Users\yan\Desktop\Battlegrounds\gamemodes\bg.pwn(401) : error 017: undefined symbol "drunklvl_difference" C:\Users\yan\Desktop\Battlegrounds\gamemodes\bg.pwn(416) : warning 213: tag mismatch C:\Users\yan\Desktop\Battlegrounds\gamemodes\bg.pwn(422) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
Float:fps = float(drunklvl_difference) / (float(timepassed_in_ms) / 1000.0),
Код:
new gfps = gDrunkLevelLast[playerid] - fps;
Код:
gDrunkLevelLast[playerid] = fps;