[Ajuda] Undefined symbol
#1

Olб pessoal, estou utilizando este tutorial para criar organizaзхes em meu gamemode: http://forum.sa-mp.com/showthread.ph...ganiza%E7%F5es

Porйm esta dando estes erros:
Код:
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(705) : error 017: undefined symbol "Orgnome"
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(705) : warning 215: expression has no effect
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(705) : error 001: expected token: ";", but found "]"
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(705) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(705) : fatal error 107: too many error messages on one line
E quando eu crio a new Orgnome; da este erro:
Код:
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(706) : error 028: invalid subscript (not an array or too many subscripts): "Orgnome"
Comando:
Код:
CMD:membros(playerid)
{
	new corda[70];
	for(new i, PP = GetMaxPlayers(); i < PP; i++)
	{
	    if(!IsPlayerConnected(PP)) continue;
	    if(ProgressaoInfo[i][Membro] == ProgressaoInfo[playerid][Membro])
	    {
	        new nome[MAX_PLAYER_NAME];
	        new Orgnome;
	        GetPlayerName(playerid, nome, sizeof(nome));
	        format(corda, sizeof(corda), "{00FF66}%s {FFFF00}Org: {00FF66}%s {FFFFFF}|| {FFFF00}Cargo: {00FF66}%d\n", nome, Orgnome[ProgressaoInfo[i][Membro]], ProgressaoInfo[i][Cargo]);
	        strcat(Texto, corda, 70);
	    }
	}
	ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Lista de membros online", Texto, "OK", "");
	strdel(Texto, 0, sizeof(Texto));
	return true;
}
Reply
#2

Houve um erro no tutorial, remova essa variбvel 'Orgnome' e coloque 'Nomeorgs' mas nгo precisa criar pois vocк jб deve ter criado no inнcio do tutorial.

pawn Код:
format(corda, sizeof(corda), "{00FF66}%s {FFFF00}Org: {00FF66}%s {FFFFFF}|| {FFFF00}Cargo: {00FF66}%d\n", nome, Nomeorgs[ProgressaoInfo[i][Membro]], ProgressaoInfo[i][Cargo]);
Reply
#3

Certo, aparentemente funcionou, mas o tutorial estava em SII e uso DOF2, entгo tive que transferir, mas agora ta dando isso:
Код:
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(177) : error 001: expected token: "}", but found "-string-"
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(792) : warning 213: tag mismatch
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(884) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(885) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(1556) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(1557) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(1427) : warning 204: symbol is assigned a value that is never used: "ParkourIniciou"
Att. 1:
Arrumei o erro, agora sу os warnings me incomodam
Код:
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(793) : warning 213: tag mismatch
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(885) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(886) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(1557) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(1558) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1.pwn(1428) : warning 204: symbol is assigned a value that is never used: "ParkourIniciou"
Reply
#4

PHP код:
for(new 0PP GetMaxPlayers(); PPi++) 
Reply
#5

Preciso de ajuda com essas warnings:
Код:
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1comorg.pwn(793) : warning 213: tag mismatch
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1comorg.pwn(1274) : warning 213: tag mismatch
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1comorg.pwn(1275) : warning 213: tag mismatch
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1comorg.pwn(1563) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Minha GM\gamemodes\barev1comorg.pwn(1564) : warning 202: number of arguments does not match definition
Linhas do warning: warning 213 tag mismatch
Код:
CMD:promover(playerid, params[])
{
	new PlayerB, cargo;
	if(sscanf(params, "d", PlayerB, Cargo)) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Uso correto: /Promover [id] [cargo]");
	if(ProgressaoInfo[playerid][Cargo] != 10) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Vocк nгo й lнder.");
	if(ProgressaoInfo[PlayerB][Membro] != ProgressaoInfo[playerid][Membro]) return SendClientMessage(playerid, COLOR_ERRO, "[ X ] Este jogador nгo й da mesma organizaзгo que vocк.");
	ProgressaoInfo[playerid][Cargo] = cargo;
	return true;
}
Linha do warning: warning 213: tag mismatch (2 linhas seguidas)
Код:
LoadPlayer(playerid)
{
    if( DOF2_FileExists( GetPlayerArquivo( playerid ) ) )
    {
        Player[ playerid ][ Score ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Score");
        Player[ playerid ][ Dinheiro ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Dinheiro");
        Player[ playerid ][ Fundador ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Fundador");
        Player[ playerid ][ Gerente ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Gerente");
        Player[ playerid ][ Admin ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Admin");
        Player[ playerid ][ Matou ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Matou");
        Player[ playerid ][ Morreu ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Morreu");
        Player[ playerid ][ Membro ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Membro"); //Linha do erro
        Player[ playerid ][ Cargo ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Cargo"); //Linha do erro

        SetPlayerScore( playerid, Player[ playerid ][ Score ] );
        GivePlayerMoney( playerid, Player[ playerid] [ Dinheiro ] );

    }
    return 1;
}
Linha do warning: warning 202: number of arguments does not match definition
Код:
stock SalvarPlayer(playerid)
{
	new nome[MAX_PLAYER_NAME];
	GetPlayerName(playerid, nome, sizeof(nome));
	format(Texto, 35, "Jogadores/%s", nome);
	DOF2_FileExists(Texto);
	DOF2_SetInt("Membro", ProgressaoInfo[playerid][Membro]); //Linha do erro
	DOF2_SetInt("Cargo", ProgressaoInfo[playerid][Cargo]); //Linha do erro
	DOF2_SaveFile();
	DOF2_Exit();
	return true;
}
Jб tentei resolver alguns e nгo consegui
Reply
#6

Por enquanto sу essa correзгo:
pawn Код:
if(sscanf(params, "dd", PlayerB, cargo))
Deve ter algum problema na declaraзгo dessas variбveis ou alguma variбvel com o mesmo nome dando conflito, posta aн.
Reply
#7

Код:
new Texto[256];

enum Info
{
    Membro,
    Cargo,
};
new ProgressaoInfo[MAX_PLAYERS][Info];

new Nomeorgs[5][128] =  //[5]
{
	"Civil",
	"Assassinos",
	"Aeronautica",
	"Drifters",
	"Policial Federal"
};


const C_Civil 		= 0xFFFFFFFF;
const C_Assassinos  = 0x000000FF;
const C_Aeronautica = 0x1E90FF99;
const C_Drifters 	= 0x1E90AA99;
const C_PFederal    = 0x6C7B8BFF;
Reply
#8

Sobre o LoadPlayer(playerid), veirifque se voce definiu as variaveis corretamente
Код:
LoadPlayer(playerid)
{
    if( DOF2_FileExists( GetPlayerArquivo( playerid ) ) )
    {
        Player[ playerid ][ Score ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Score");
        Player[ playerid ][ Dinheiro ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Dinheiro");
        Player[ playerid ][ Fundador ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Fundador");
        Player[ playerid ][ Gerente ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Gerente");
        Player[ playerid ][ Admin ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Admin");
        Player[ playerid ][ Matou ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Matou");
        Player[ playerid ][ Morreu ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Morreu");
        Player[ playerid ][ Membro ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Membro"); //Linha do erro, isso 
        Player[ playerid ][ Cargo ] = DOF2_GetInt(GetPlayerArquivo(playerid), "Cargo"); //Linha do erro

        SetPlayerScore( playerid, Player[ playerid ][ Score ] );
        GivePlayerMoney( playerid, Player[ playerid] [ Dinheiro ] );

    }
    return 1;
}
Код:
stock SalvarPlayer(playerid)
{
	new nome[MAX_PLAYER_NAME];
	GetPlayerName(playerid, nome, sizeof(nome));
	format(Texto, 35, "Jogadores/%s", nome);
	DOF2_FileExists(Texto);
	DOF2_SetInt(Texto, "Membro", ProgressaoInfo[playerid][Membro]);
	DOF2_SetInt(Texto, "Cargo", ProgressaoInfo[playerid][Cargo]);
	DOF2_SaveFile();
	//DOF2_Exit(); WTF??
	return true;
}
Reply
#9

Quote:
Originally Posted by Minerva
Посмотреть сообщение
Sobre o LoadPlayer(playerid), veirifque se voce definiu as variaveis corretamente
Код:
stock SalvarPlayer(playerid)
{
	new nome[MAX_PLAYER_NAME];
	GetPlayerName(playerid, nome, sizeof(nome));
	format(Texto, 35, "Jogadores/%s", nome);
	DOF2_FileExists(Texto);
	DOF2_SetInt(Texto, "Membro", ProgressaoInfo[playerid][Membro]);
	DOF2_SetInt(Texto, "Cargo", ProgressaoInfo[playerid][Cargo]);
	DOF2_SaveFile();
	//DOF2_Exit(); WTF??
	return true;
}
Carvalho, maluco й brabo, vlw bro, agora sу falta 3 warnings, vou bater a cabeзa no LoadPlayer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)