SA-MP Forums Archive
Variables confliect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Variables confliect (/showthread.php?tid=342888)



Variables confliect - klap - 15.05.2012

Hi, im getting a problem :/
i have this variable in the begin of my script (global variable)

new Conhecidosde[4096][MAX_PLAYERS];

and more below i have other global variable:

enum Factions
{
fName[50],
Float:fX,
Float:fY,
Float:fZ,
fMaterials,
fDrugs,
fBank,
fRank1[35],
fRank2[35],
fRank3[35],
fRank4[35],
fRank5[35],
fRank6[35],
fRank7[35],
fRank8[35],
fRank9[35],
fRank10[35],
fSkin1,
fSkin2,
fSkin3,
fSkin4,
fSkin5,
fSkin6,
fSkin7,
fSkin8,
fSkin9,
fSkin10,
fJoinRank,
fUseSkins,
fType,//For Government factions etc
fRankAmount,
fColor[128],
fUseColor,
};
new DynamicFactions[10][Factions];

and the problem is, in the script, i dont know why, i think that they are having conflict '-'
because when i restart the server, and all the script save's

the info of DynamicFactions[0][Factions] goes to DynamicFactions[1][Factions] and this goes to DynamicFactions[2][Factions]

etc...etc...

all the script was going right until i need to create the variable "new Conhecidosde[4096][MAX_PLAYERS];"

if you know what is bad with the variable , plz say-me '-'


Re: Variables confliect - [MG]Dimi - 15.05.2012

pawn Код:
new Conhecidosde[4096][MAX_PLAYERS];
Into

pawn Код:
new Conhecidosde[MAX_PLAYERS][4096];
Like that it will work good probably. Tell if it's fixed.


Re: Variables confliect - klap - 15.05.2012

i will go test now, but can you explain me why can't be new Conhecidosde[4096][MAX_PLAYERS];?


Re: Variables confliect - SuperViper - 15.05.2012

It could totally be

pawn Код:
new Conhecidosde[4096][MAX_PLAYERS];
but then you would have 4096 strings with a length of 500 instead of 500 strings with a length of 4096.


Re: Variables confliect - klap - 15.05.2012

doesn't resolve :/

i dont want strings

the information i want to save is like

Conhecidosde[0][1] = 11;

Conhecidosde[1][1] = 13;

Conhecidosde[3][4] = 13;

etc '-'

more ideias pliz? :/