Thread: does it make any sense

  1. #1
    Registered User
    Join Date
    May 2009

    does it make any sense

    	void AddItem(int A)
    		int B;
            amount += A;
    		if( amount < stackSize )
    			B = amount - stackSize;
        void GetItem(int A)
    		for( int iii=0; iii != MAX_INV; iii++)
    			if( charInv[iii].id == 0 )
    				charInv[iii] = *this; 
    			else if( charInv[iii].id == id)
    				if( charInv[iii].amount < stackSize)
    does this code make any sense?

    what i tried to do here is when u get item the prog' look for empty slots if it finds one it copies the item into the empty slot if it find a slot with the same item and the and there's still stacksize left it adds the item amount to the item (uses different prog') if the amount passe the stacksize then it reads by how much it passed it and then subscribes it from the amount and then calls the GetItem prog' to put it in new slot, it won't put it on the same slot because of the condition statement
    Last edited by ExDHaos; 05-23-2009 at 08:21 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Does this even remotely make sense
    By hckr83 in forum C Programming
    Replies: 6
    Last Post: 12-23-2005, 05:02 PM
  2. want to make this small program...
    By psycho88 in forum C++ Programming
    Replies: 8
    Last Post: 11-30-2005, 02:05 AM
  3. Question about atheists
    By gcn_zelda in forum A Brief History of
    Replies: 160
    Last Post: 08-11-2003, 11:50 AM
  4. 'functions' in make?
    By mart_man00 in forum C Programming
    Replies: 1
    Last Post: 06-21-2003, 02:16 PM
  5. Foreigners don't make sense
    By Shadow in forum A Brief History of
    Replies: 19
    Last Post: 04-25-2002, 02:31 PM