i think something like this should work:
Code:
function pan_checkbuttons(PANEL* parapan, var hiver)
{
    var buttcount = 0
    var hivecount =1;
    for(hivecount=1; hivecount <= hiver; hivecount ++)
    {
        if(pan_setbutton(parapan, hivecount, 0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL) == 0)
        {hivecount = hiver+2;}
        else
        {buttcount +=1;}
    }
    return(buttcount);
}


or
Code:
function pan_checkbuttons(PANEL* parapan)
{
    var buttcount = 0
    var hivecount =1;
    while(1)
    {
        if(pan_setbutton(parapan, hivecount, 0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL) == 0)
        {break;}
        else
        {buttcount +=1; hivecount +=1;}
    }
    return(buttcount);
}





Problem are the the pan_setbutton arguments.. i don't know if they work with NULL ^^"

not tested, written on iPhone.

Last edited by Espér; 06/06/12 09:09.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<