20.10.2016, 13:20
Hello.
I have a error on my script. I have command: /stats. It gave me 4 ERRORS. The command is BELOW !
The error:
The LINE:
I have a error on my script. I have command: /stats. It gave me 4 ERRORS. The command is BELOW !
Код:
#if defined USE_STATS CMD:stats(playerid,params[]) { new string[128], pDeaths, player1, h, m, s; if(isnull(params)) player1 = playerid; else player1 = strval(params); if(IsPlayerConnected(player1)) { TotalGameTime(player1, h, m, s); if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths]; format(string, sizeof(string), "{5EFF00}| %s's Stats: Level: %d | Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d | Bank: $%d | Time: %d hrs %d mins %d secs |",PlayerName2(player1),PlayerInfo[player1][Level],PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[playerid][bank], h, m, s); return SendClientMessage(playerid, red, string); } else return SendClientMessage(playerid, red, "Player Not Connected!"); } #endif
Код:
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM.pwn(11520) : error 012: invalid function call, not a valid address C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM.pwn(11520) : warning 215: expression has no effect C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM.pwn(11520) : error 001: expected token: ";", but found ")" C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM.pwn(11520) : error 029: invalid expression, assumed zero C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM.pwn(11520) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
format(string, sizeof(string), "{5EFF00}| %s's Stats: Level: %d | Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d | Bank: $%d | Time: %d hrs %d mins %d secs |",PlayerName2(player1),PlayerInfo[player1][Level],PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[playerid][bank], h, m, s);