The Dink Network

Reply to Re: 100th callback problem

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
February 27th 2011, 10:56 AM
pillbug.gif
dinkinfreak
Peasant He/Him Greece
Real lurkers don't appear on the lurkers list. 
Well, the engine can handle running out of callback slots; it simply returns 0 as the callback ID.
I had problems running the kill_all_callbacks procedure; it runs from 1 to max_callbacks(100), while the table has max_callbacks(0 to 99) slots.
I had tinkered with the source and a bitmap was placed right after the callback table, the inexistent slot 100 was marked as active, and the game crashed as soon as it tried to kill_all_callbacks.

tl;dr: editing the line
call_back callback[max_callbacks]

in dinkvar.h to
call_back callback[max_callbacks+1]

should fix it.