25.01.2010, 16:36
The following code is my problem. Read below for more about my problem.
As you can see from the log (below), dini_Isset() crashes the script because neither
nor
were called. Is anybody able to explain this problem?
(it moves on to the next FS)
What's more, if i comment
it STILL crashes.
Thanks for your time & help,
Jonrb
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;
}
pawn Код:
print("No mods for this car present")
pawn Код:
print("Mods for this car present")
Quote:
Originally Posted by server log
LoadMods(562);
Variables declared Loading filter script '*****.amx'... |
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");
Thanks for your time & help,
Jonrb