Jump to content
×
×
  • Create New...
  • 0

for i in xrange all time zero why?


lordsas61

Question

    def __RefreshExinvenSlotState(self):
    
        inventory_max = player.GetExtendInvenMax()
                
        for i in xrange(player.INVENTORY_PAGE_SIZE):
        
            slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
            
            if slotNumber >= inventory_max:
                self.wndItem.LockSlot(i)
            else:
                self.wndItem.UnlockSlot(i)    


player.INVENTORY_PAGE_SIZE = 45

but all time
i = 0
what is problem?
 

badass hei GIF

Link to comment
Share on other sites

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0

@WeedHex I know but not working.

normal is ->
for i in xrange(45):
1,2,3,4,5.. 45

but my document is
for i in xrange(45):
0,0,0,0,0...0

 

My files all try

for i in xrange(45):
print(i)

0,0,0,0,0...

and

for i in xrange(45)
print(2*i)

0,2,4,6,8,10...

and

for i in xrange(45)
print(1*i)

0,0,0,0,0,0

and

for i in xrange(45)
print((2*i)/2)

0,0,0,0,0,0

and

for i in xrange(45)
print(i+1)

1,1,1,1,1,1

and

for i in xrange(45)
print(2*i-1)

-1,1,3,5,7

Not Understand Help Please!

badass hei GIF

Link to comment
Share on other sites

  • 0

@WeedHex
I am using Python2.7.
The logic of the code is simple.
what i don't understand is what is preventing it from working properly?

Why doesn't it work properly in these codes:
self.wndItem.LockSlot(i)
self.wndItem.UnLockSlot(i)

Edited by lordsas61

badass hei GIF

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 36

      Destroy Item System

    2. 1

      Brillances

    3. 0

      Fusion.org is Looking for Staff Members

    4. 1

      Brillances

    5. 3

      ELONIA2 | PVM-MEDIUM | 11 LANGUAGES | INTERNATIONAL | A NEW STORY

    6. 4

      Spider Queen not spawining in spider dungeon v1

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.