Jump to content
  • 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

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


×
×
  • Create New...

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.