28.12.2013, 16:02
Hello guys, please why I cant compile this? It is code for command, in which i set real time/seconds when server to restart. For example: I type /restart 5 it restarts in 5 seconds when i type /restart 15 00 It will restart in 15:00 real time, here is also saving before restart. But i do not know why I am getting these errors:
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 3 : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 39) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 40) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 41) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 42) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 44) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 4 : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 50) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 67) : error 035: argument type mismatch (argument 1)
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 6 : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
10 Errors.
THE MISMATCH ERRORS LINES IN CODE/PLAYERIDS ARE ALL ERRORING (every error in the code)
Thanks
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 3 : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 39) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 40) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 41) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 42) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 44) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 4 : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 50) : error 017: undefined symbol "playerid"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 67) : error 035: argument type mismatch (argument 1)
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(4 6 : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
10 Errors.
THE MISMATCH ERRORS LINES IN CODE/PLAYERIDS ARE ALL ERRORING (every error in the code)
pawn Код:
forward CasovyRestart();
public CasovyRestart()
{
new H, M;
gettime (H, M);
if (Hodina == H && Minuta == M)
{
SendClientMessageToAll (-1, "<Server> Za Minutu proběhne restart servru!");
new INI:Subor = INI_Open (Umiestnenie (playerid)), Float:PoziciaX, Float:PoziciaY, Float:PoziciaZ, Float:Uhol;
GetPlayerPos (playerid, PoziciaX, PoziciaY, PoziciaZ);
GetPlayerFacingAngle (playerid, Uhol);
INI_WriteInt (Subor, "AdminLevel", PouzivateloveInformacie [playerid] [pAdminLevel]);
INI_WriteInt (Subor, "Peniaze", GetPlayerMoney (playerid));
INI_SetTag (Subor, "Pozicia");
INI_WriteInt (Subor, "Interier", GetPlayerInterior (playerid));
INI_WriteFloat (Subor, "PoziciaX", PoziciaX);
INI_WriteFloat (Subor, "PoziciaY", PoziciaY);
INI_WriteFloat (Subor, "PoziciaZ", PoziciaZ);
INI_WriteInt (Subor, "Skin", GetPlayerSkin (playerid));
INI_WriteFloat (Subor, "Uhol", Uhol);
INI_WriteInt (Subor, "VirtualnySvet", GetPlayerVirtualWorld (playerid));
INI_Close (Subor);
SetTimer ("RestartServeru", 1000*60, false);
}
SetTimer("CasovyRestart",1000*50,false);
return 1;
}
YCMD:restart (playerid, params [], help)
{
if (!IsPlayerAdmin (playerid)) return SendClientMessage (playerid, -1, "Tento prнkaћ mфћe pouћiť len administrбtor!");
new param1, param2;
param1=strval(params);
param2=chrfind(' ',params) + 1;
//mismatch 1 error one line down
if(strlen(param1)==0) return SendClientMessage (playerid, -1, "Zadej /restart [sekundy] nebo /restart [HH MM]");
if(strlen(param2)==0) //mismatch 2 error
{
GMX = 1;
new str[100];
format(str,100,"<Server> Prebehne reљtart serveru! za %d sekund",par1);
SendClientMessageToAll (-1, "<Server> Prebehne reљtart serveru!");
new INI:Subor = INI_Open (Umiestnenie (playerid)), Float:PoziciaX, Float:PoziciaY, Float:PoziciaZ, Float:Uhol;
GetPlayerPos (playerid, PoziciaX, PoziciaY, PoziciaZ);
GetPlayerFacingAngle (playerid, Uhol);
INI_WriteInt (Subor, "AdminLevel", PouzivateloveInformacie [playerid] [pAdminLevel]);
INI_WriteInt (Subor, "Peniaze", GetPlayerMoney (playerid));
INI_SetTag (Subor, "Pozicia");
INI_WriteInt (Subor, "Interier", GetPlayerInterior (playerid));
INI_WriteFloat (Subor, "PoziciaX", PoziciaX);
INI_WriteFloat (Subor, "PoziciaY", PoziciaY);
INI_WriteFloat (Subor, "PoziciaZ", PoziciaZ);
INI_WriteInt (Subor, "Skin", GetPlayerSkin (playerid));
INI_WriteFloat (Subor, "Uhol", Uhol);
INI_WriteInt (Subor, "VirtualnySvet", GetPlayerVirtualWorld (playerid));
INI_Close (Subor);
SetTimer ("RestartServeru", 1000*par1, false);
}else{
Hodina=par1;
Minuta=par2;
SetTimer("CasovyRestart",1000*50,false);
}
return true;
}