07.01.2011, 10:21
koe galera ja tenho uma noзao de midificar agora estou tentando criar um gm do zero
ERROS \/
LINHAS \/
desde ja agradeзo a ajuda de vcs ! ! !
ERROS \/
pawn Код:
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(10) : error 049: invalid line continuation
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(33) : error 049: invalid line continuation
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(34) : error 055: start of function body without function header
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(57) : error 010: invalid function or declaration
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(59) : error 017: undefined symbol "pInfo"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(59) : error 009: invalid array size (negative, zero or out of bounds)
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(113) : error 017: undefined symbol "pSenha"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(115) : error 017: undefined symbol "pSenha"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(116) : error 017: undefined symbol "pDinheiro"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(117) : error 017: undefined symbol "pNivel"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(118) : error 017: undefined symbol "pConnectTime"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(119) : error 017: undefined symbol "pRegistro"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(120) : error 017: undefined symbol "pAdmin"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(121) : error 017: undefined symbol "pHelper"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(122) : error 017: undefined symbol "pVip"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(123) : error 017: undefined symbol "pSexo"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(124) : error 017: undefined symbol "pPayDay"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(125) : error 017: undefined symbol "pPayDayHad"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(150) : error 017: undefined symbol "pSenha"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(152) : error 017: undefined symbol "pSenha"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(159) : error 017: undefined symbol "pNivel"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(160) : error 017: undefined symbol "pConnectTime"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(161) : error 017: undefined symbol "pRegistro"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(162) : error 017: undefined symbol "pAdmin"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(163) : error 017: undefined symbol "pHelper"
D:\Servers\GTA Samp\gamemodes\ExTrEmE.pwn(164) : error 017: undefined symbol "pVip"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
pawn Код:
#include <a_samp>
#include <dini>
#define FLOAT_INFINITY (Float:0x7F800000)
#define REG_LOG 4
#define UpdateConfig 500 //Atualizaзгo em funзхes Speedo ... (Miliseconds)
#define SEC2 2000
//---------------------------------- | CORES |----------------------------------\\
#define COLOR_CV 0xFF000096
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_LOGIN 0x61DAE0FF
forward OnPlayerRegister(playerid, password[]);
forward OnPlayerLogin(playerid,password[]);
forward OnPlayerUpdate(playerid);
forward ini_GetKey( line[] );
forward ini_GetValue( line[] );
forward ShowStats(playerid,targetid);
forward GameModeExitFunc();
forward DollahScoreUpdate();
forward GameModeInitExitFunc();
forward Velocimetro();
forward SyncTime();
forward SyncUp();
forward PayDay();
forward AdminUpdate(playerid);
forward pOnline();
//---------------------------------- | ENUM | ----------------------------------\\
enum pInfo
{
pSenha[128],
pNivel,
pExp,
pAdmin,
pHelper,
pSexo,
pRoupa,
pTrabalhar,
pAdmInvisivel,
pVip,
pConnectTime,
pRegistro,
pDinheiro,
pIdade,
pOrigem,
pCash,
pConta,
pPayDay,
pPayDayHad,
Float:pHealth,
Float:pSHealth,
PlayerInfo,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
new gPlayerSpawned[MAX_PLAYERS];
new gPlayerLogged[MAX_PLAYERS];
new gPlayerLogTries[MAX_PLAYERS];
new gPlayerConta[MAX_PLAYERS];
new Text:PlayersOnServer;
new synctimer;
new dollah = 1000;
new levelcost = 25000;
new Text:TForum[MAX_PLAYERS];
new Text:LBox;
new Text:LLine1[MAX_PLAYERS];
new Text:LLine2[MAX_PLAYERS];
new Text:LLine3[MAX_PLAYERS];
new Text:LLine4[MAX_PLAYERS];
new Text:LCredits[MAX_PLAYERS];
new Text:Lmph[MAX_PLAYERS];
new Text:LFunc[MAX_PLAYERS];
new LuX_SpeedoMeter[MAX_PLAYERS];
new VehicleStatus[MAX_VEHICLES];
public OnGameModeInit()
{
synctimer = SetTimer("SyncUp", 5000, 1);
SetTimer("pOnline", SEC2, 1);
SetTimer("Velocimetro", UpdateConfig, 1);
SetGameModeText("EPF: V1.0");
SendRconCommand("hostname ExTrEmE PlAy FoReVeR");
SendRconCommand("mapname Brasil: LS");
AddPlayerClass(0, 1128.8350,-1489.8019,22.7690,359.2440, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
for(new i=0; i<MAX_PLAYERS; i++) {
TextDrawHideForPlayer(i, PlayersOnServer);
}
return 1;
}
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "Contas/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
strmid(PlayerInfo[playerid][pSenha], password, 0, strlen(password), 255);
new var[32];
format(var, 32, "Senha=%s\n", PlayerInfo[playerid][pSenha]);fwrite(hFile, var);
PlayerInfo[playerid][pDinheiro] = GetPlayerMoneyEx(playerid);
format(var, 32, "Nivel=%d\n",PlayerInfo[playerid][pNivel]);fwrite(hFile, var);
format(var, 32, "TempoOn=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
format(var, 32, "Registrado=%d\n",PlayerInfo[playerid][pRegistro]);fwrite(hFile, var);
format(var, 32, "AdminNivel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "HelperNivel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
format(var, 32, "Vip=%d\n",PlayerInfo[playerid][pVip]);fwrite(hFile, var);
format(var, 32, "Sexo=%d\n",PlayerInfo[playerid][pSexo]);fwrite(hFile, var);
format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
fclose(hFile);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Login", "Digite sua Senha para Logar!!!\n\nSe errar a senha 5 vezes serб banido por serguranзa", "Logar", "Cancelar");
}
}
return 1;
}
public OnPlayerLogin(playerid,password[])
{
new tmp2[256];
new string2[64];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "Contas/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Senha" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pSenha], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(PlayerInfo[playerid][pSenha],password, true ) == 0 )
{
new key[ 256 ] , val[ 256 ];
new Data[ 256 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "Nivel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNivel] = strval( val ); }
if( strcmp( key , "TempoOn" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
if( strcmp( key , "Registrado" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRegistro] = strval( val ); }
if( strcmp( key , "AdminNivel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
if( strcmp( key , "HelperNivel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
if( strcmp( key , "Vip" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVip] = strval( val ); }
if( strcmp( key , "Sexo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexo] = strval( val ); }
if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
}//end while
fclose(UserFile);//close the file after everything has been read in the while
}
else
{
SendClientMessage(playerid, COLOR_CV, "Senha errada! - Se errar a senha 5 veses й BAN.");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 5) { Ban(playerid); }
return 1;
}
format(string2, sizeof(string2), "Bem vindo %s",playername2);
SendClientMessage(playerid, COLOR_LOGIN,string2);
printf("%s Acabou se logar.",playername2);
if (PlayerInfo[playerid][pVIP] == 1)
{
SendClientMessage(playerid, COLOR_LOGIN,"Voce e jogador Vip");
}
if (PlayerInfo[playerid][pVIP] == 2)
{
SendClientMessage(playerid, COLOR_LOGIN,"Voce e jogador Super-Vip");
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
format(string2, sizeof(string2), "Voce Logou Com Nivel %d de Admin.",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_LOGIN,string2);
}
if (PlayerInfo[playerid][pHelper] > 0)
{
format(string2, sizeof(string2), "Voce Logou Com Nivel %d de Helper.",PlayerInfo[playerid][pHelper]);
SendClientMessage(playerid, COLOR_LOGIN,string2);
}
if((PlayerInfo[playerid][pHelper] >= 1))
{
new string[256];
new HelperName[MAX_PLAYER_NAME];
GetPlayerName(playerid, HelperName, sizeof(HelperName));
format(string, sizeof(string), "~w~Helper - ~y~%s: ~g~Online", HelperName);
for(new i=0; i<MAX_PLAYERS; i++)
{
GameTextForPlayer(i, string , 5000, 3);
}
}
else if((PlayerInfo[playerid][pAdmin] >= 1000 && PlayerInfo[playerid][pAdmin] <= 6000))
{
new string[256];
new AdminName[MAX_PLAYER_NAME];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
format(string, sizeof(string), "~y~%s: ~g~Online", AdminName);
}
return 1;
}