28.01.2010, 12:37
Quote:
|
Originally Posted by WrathOfGenesis
Telling us the line numbers could help us to identify where the problem is
|
pawn Код:
PlayerInfo[playerid][pMarriedTo] = dini_Get(string2, "MarriedTo"); //error line
PlayerInfo[playerid][pNote1] = dini_Get(string2, "Note1"); //error line
PlayerInfo[playerid][pNote1s] = dini_Int(string2, "Note1s");
PlayerInfo[playerid][pNote2] = dini_Get(string2, "Note2"); //error line
PlayerInfo[playerid][pNote2s] = dini_Int(string2, "Note2s");
PlayerInfo[playerid][pNote3] = dini_Get(string2, "Note3"); //error line
PlayerInfo[playerid][pNote3s] = dini_Int(string2, "Note3s");
PlayerInfo[playerid][pNote4] = dini_Get(string2, "Note4"); //error line
PlayerInfo[playerid][pNote4s] = dini_Int(string2, "Note4s");
PlayerInfo[playerid][pNote5] = dini_Get(string2, "Note5"); //error line
PlayerInfo[playerid][pNote5s] = dini_Int(string2, "Note5s");
Quote:
|
Originally Posted by Seif_
Use strmid when using dini_Get with the string variables.
|
bother to explain further more, Im new to Dini, but still understand it allitle.
pawn Код:
stock dini_Get(filename[],key[]) {
new tmpres[DINI_MAX_STRING];
new key_length = strlen(key);
if (key_length==0 || key_length+2>DINI_MAX_STRING) return tmpres;
new File:fohnd;
fohnd=fopen(filename,io_read);
if (!fohnd) return tmpres;
while (fread(fohnd,tmpres)) {
if (
tmpres[key_length]=='='
&& !strcmp(tmpres, key, true, key_length)
) {
/* We've got what we need */
DINI_StripNewLine(tmpres);
strmid(tmpres, tmpres, key_length + 1, strlen(tmpres), DINI_MAX_STRING); // STRMID FUNC
