[Ajuda] sistema de salvamento
#2

novo codigo:

Code:
#include <a_samp>

enum FACCAO
{
	PCC, CV, FDN,  		// Famнlia do Norte
	GRO, BALL, PM, PF,  // Groove, Ballas, PM, e Policia Federal
	EB, MIL, EST,  		// Exйrcito, Milнcia Estado e Islвmico
	FUNDOS, DROGAS, LIDER
};

new OrgIf[MAX_PLAYERS][FACCAO], ORGS[256];

GetNome(playerid)
{
    new pNome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pNome, 24);
    return pNome;
}

GetOrg(playerid)
{
	if	   (OrgIf[playerid][PM] = 1)  =  "Polнcia Militar";
	else if(OrgIf[playerid][PF] = 1)  = "Polнcia Federal";
	else if(OrgIf[playerid][EB] = 1)  = "Exйrcito";
	else if(OrgIf[playerid][PCC] = 1) = "PCC";
	else if(OrgIf[playerid][CV] = 1)  = "Comando Vermelho";
	else if(OrgIf[playerid][FDN] = 1) = "Famнlia do Norte";
	else if(OrgIf[playerid][MIL] = 1) = "Milнcia";
	else if(OrgIf[playerid][EST] = 1) = "Estado Islвmico";

	// Verificar se й lider

	new a = GetOrg(playerid);
	else if(OrgIf[playerid][a] = 6)
	{
 		return "Lider %s", GetNome(playerid);
 		OrgIf[playerid][LIDER] = 1;
	}
}

CRIAR_ORG(GetOrg(playerid))
{
    format(ORGS, sizeof(ORGS), "ORGS/%s.ini", GetOrg(playerid));

	if(OrgIf[playerid][LIDER] = 1)
	{
	    new str[80];
	    format(str, sizeof(str),"%s" GetNome(playerid));
	}
    DOF2_SetInt(ORGS, "LIDER", str  );
    DOF2_SetInt(ORGS, "MEMBROS", 1);
    DOF2_SetInt(ORGS, "FUNDOS", 98);
    DOF2_SetInt(ORGS, "DROGAS", 500);
    DOF2_SaveFile();
}

// -----------------------------------------------------------------------------
CARREGAR_ORG(GetOrg(playerid))
{
    format(ORGS, sizeof(ORGS), "ORGS/%s.ini", GetOrg(playerid));

//    OrgIf[playerid][pAdmin] = DOF2_GetInt(ORGS, "LIDER");
//    OrgIf[playerid][pCivil] = DOF2_GetInt(ORGS, "MEMBROS");
    OrgIf[playerid][FUNDOS] = DOF2_GetInt(ORGS, "FUNDOS");
    OrgIf[playerid][GRANA] = DOF2_GetInt(ORGS, "DROGAS");

}
// -----------------------------------------------------------------------------
SALVAR_ORG(GetOrg(playerid))
{
    format(Conta, sizeof(Conta), "Contas/%s.ini", GetNome(playerid));

//    DOF2_SetInt(ORGS, "LIDER", OrgIf[playerid][pAdmin]);
//    DOF2_SetInt(ORGS, "MEMBROS", OrgIf[playerid][pSkin]);
    DOF2_SetInt(ORGS, "FUNDOS", OrgIf[playerid][FUNDOS]);
    DOF2_SetInt(ORGS, "DROGAS", OrgIf[playerid][DROGAS]);

    DOF2_SaveFile();
}
Erros:

Code:
C:\Users\Lucas\Desktop\Untitled.pwn(22) : warning 211: possibly unintended assignment
C:\Users\Lucas\Desktop\Untitled.pwn(22) : error 029: invalid expression, assumed zero
C:\Users\Lucas\Desktop\Untitled.pwn(22) : warning 215: expression has no effect
C:\Users\Lucas\Desktop\Untitled.pwn(23) : error 029: invalid expression, assumed zero
C:\Users\Lucas\Desktop\Untitled.pwn(23) : warning 215: expression has no effect
C:\Users\Lucas\Desktop\Untitled.pwn(23) : error 001: expected token: ";", but found "if"
C:\Users\Lucas\Desktop\Untitled.pwn(23) : warning 211: possibly unintended assignment
C:\Users\Lucas\Desktop\Untitled.pwn(23) : error 029: invalid expression, assumed zero
C:\Users\Lucas\Desktop\Untitled.pwn(23) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply


Messages In This Thread
sistema de salvamento - by Duun - 01.09.2018, 20:32
Re: sistema de salvamento - by Duun - 01.09.2018, 20:43
Re: sistema de salvamento - by Duun - 01.09.2018, 20:59
Re: sistema de salvamento - by Duun - 01.09.2018, 21:11
Re: sistema de salvamento - by Undef1ned - 01.09.2018, 21:25
Re: sistema de salvamento - by Duun - 01.09.2018, 21:49
Re: sistema de salvamento - by SIZET - 01.09.2018, 22:55
Re: sistema de salvamento - by Malandrin - 01.09.2018, 23:27
Re: sistema de salvamento - by Don_Speed - 02.09.2018, 00:34
Re: sistema de salvamento - by Duun - 02.09.2018, 13:05
Re: sistema de salvamento - by Duun - 03.09.2018, 15:33
Re: sistema de salvamento - by vitinhosamp - 03.09.2018, 15:49
Re: sistema de salvamento - by SIZET - 03.09.2018, 15:52
Re: sistema de salvamento - by Duun - 03.09.2018, 16:50
Re: sistema de salvamento - by vitinhosamp - 03.09.2018, 16:52
Re: sistema de salvamento - by Duun - 03.09.2018, 17:08
Re: sistema de salvamento - by rhaegartargaryen - 03.09.2018, 17:08
Re: sistema de salvamento - by Duun - 03.09.2018, 17:40
Re: sistema de salvamento - by Duun - 03.09.2018, 18:11
Re: sistema de salvamento - by vitinhosamp - 03.09.2018, 18:22
Re: sistema de salvamento - by Duun - 03.09.2018, 18:26
Re: sistema de salvamento - by Felipealves - 03.09.2018, 18:27
Re: sistema de salvamento - by Malandrin - 03.09.2018, 18:30
Re: sistema de salvamento - by y1 - 03.09.2018, 18:49
Re: sistema de salvamento - by vitinhosamp - 03.09.2018, 18:55
Re: sistema de salvamento - by SIZET - 03.09.2018, 21:11

Forum Jump:


Users browsing this thread: 1 Guest(s)