[HELP] dini errors
#1

The following code is my problem. Read below for more about my problem.
pawn Код:
LoadMods(vehid)
{
    printf("LoadMods(%i);",vehid);
    new modelstr[5],str[256];
    new nos[256],
        hyd[256],
        spoil[256],
        wheels[256],
        rscoop[256],
        exhaust[256],
        rbumper[256],
        fbumper[256];
    new idx=0;
    print("Variables declared");
    format(modelstr,sizeof(modelstr),"%i",vehid);
    if(!dini_Isset(MODFILE,modelstr)) return print("No mods for this car present");
    else print("Mods for this car present");
    str=dini_Get(MODFILE,modelstr);
    printf("string for %i retrieved(%s)",vehid,str);
    nos=strtok(str,idx);
    hyd=strtok(str,idx);
    spoil=strtok(str,idx);
    wheels=strtok(str,idx);
    rscoop=strtok(str,idx);
    exhaust=strtok(str,idx);
    rbumper=strtok(str,idx);
    fbumper=strtok(str,idx);
    print("string split");
    ApplyComponent(vehid,nos);
    ApplyComponent(vehid,hyd);
    ApplyComponent(vehid,spoil);
    ApplyComponent(vehid,wheels);
    ApplyComponent(vehid,rscoop);
    ApplyComponent(vehid,exhaust);
    ApplyComponent(vehid,rbumper);
    ApplyComponent(vehid,fbumper);
    printf("mods for %i applied",vehid);
    return 0;
}
As you can see from the log (below), dini_Isset() crashes the script because neither
pawn Код:
print("No mods for this car present")
nor
pawn Код:
print("Mods for this car present")
were called. Is anybody able to explain this problem?

Quote:
Originally Posted by server log
LoadMods(562);
Variables declared
Loading filter script '*****.amx'...
(it moves on to the next FS)

What's more, if i comment
Код:
if(!dini_Isset(MODFILE,modelstr)) return print("No mods for this car present");
else print("Mods for this car present");
it STILL crashes.
Thanks for your time & help,
Jonrb
Reply
#2

sorry for bumping, but i would really like a solution..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)