Odd bug in v2k+j?
Displaying 1-1 of 1 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
el_desconocido

I'm helping William to port Lord Fruitiger's LotBSO to v2k+j, and encountered the following strange bug. The following is copied from the set-up function. It works fine in other verge versions, but in v2k+j, the first member in party.dat gets loaded twice. As in when lin = 1 and 2 it loads the first person's chrdat, then proceeds to load normally (except of course missing the true 10th member, it correctly loads 10 party 'slots').

For(lin=1; lin<11; lin++)
{
partydat = fopen("party.dat");
fseekline(lin,partydat); fgetline(strin,partydat); party.chr[lin-1] = left(strin,12);
chrdat = mid(strin,26,12);
fclose(partydat);
datfil = fopen(chrdat);
fseekline(1,datfil); fgetline(strin,datfil); party.name[lin-1] = strin; ptmp=0; While(!ptmp) { If(!strcmp(right(party.name[lin-1],1)," ")) party.name[lin-1] = left(party.name[lin-1],strlen(party.name[lin-1])-1); Else { ptmp++; } }
fseekline(2,datfil); fgetline(strin,datfil);
party.exp[lin-1] = val(left(strin,1));
party.maxhp[lin-1] = val(mid(strin,7,5));
party.maxmp[lin-1] = val(mid(strin,15,4));
party.curhp[lin-1] = party.maxhp[lin-1]; party.curmp[lin-1] = party.maxmp[lin-1]; party.tmaxhp[lin-1] = party.maxhp[lin-1];
party.lvl[lin-1] = 1;
party.str[lin-1] = val(mid(strin,23,4));
party.end[lin-1] = val(mid(strin,30,4));
party.mag[lin-1] = val(mid(strin,37,4));
party.mgr[lin-1] = val(mid(strin,43,4));
party.hit[lin-1] = val(mid(strin,50,4));
party.dod[lin-1] = val(mid(strin,57,4));
party.spd[lin-1] = val(mid(strin,75,4));
party.wil[lin-1] = val(mid(strin,70,4));
party.luc[lin-1] = val(mid(strin,64,4));
fseekline(3,datfil); fgetline(strin,datfil); party.nxt[lin-1] = val(left(strin,6));
party.status[lin-1]="X0000000000";
party.elematk[lin-1]="X11111111";
party.elemdef[lin-1]="X11111111";
fclose(datfil);
}




-Pontifex
(aka: ¶, the coder formerly known as Prince Paul)

Posted on 2000-11-11 21:25:25


Displaying 1-1 of 1 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.