Jump to content

me being braindead once again


Sikkunt Aaron

Recommended Posts

if(!getInventory().isFull()){
    //inventory not full <28
}else{
    //inventory is full >28
}
Or you coule check out

getInventory().isFull()

getInventory().isEmpty()

.isEmpty will only work when there is no items in the inventory. So you are better of doing !getInventory().isFull() because that will let you do stuff while the inventory is not full and it can still contain items without saying it is full, because you need 28 items for it to be full :p

  • Like 1
Link to comment
Share on other sites

if(inventory.isFull()) {
//action you want it to do
}
if(!inventory.isFull()) {
//action you want it to do
}

the "!" in front of booleans (conditions) basically means the opposite return than if it didn't have it.

if else statements work well too, but I would stick to using just if statements for now, but thats just my opinion

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...