User:Ela Talaj

From Second Life Wiki
Jump to: navigation, search

[[File:integer page;

CalculatePages() {

  if(items_num > 11)
    {
    pages_number = items_num / 9;
    last_page_items = items_num % 9;
    if(last_page_items) ++pages_number;
    else last_page_items = 9;
    }
  else
    {
    pages_number = 1;
    last_page_items = items_num;
    }        
  page = 1;                                                 // current page = first one

}]]