Jump to content




Drop All But One Slot - Loop Not Working


  • You cannot reply to this topic
30 replies to this topic

#21 marth010

  • New Members
  • 9 posts

Posted 11 January 2013 - 04:42 PM

Oh cool I didn't know that. The one I have was the only thing I could think of at the time

#22 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 11 January 2013 - 04:46 PM

haha thats ok, everyone has to learn the apis at some point :)

#23 Heracles421

  • Members
  • 258 posts

Posted 11 January 2013 - 04:47 PM

That's why we're here, to help you out. And as you can see some users really help out a lot, and they also know a lot (TheOriginalBIT)

#24 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 11 January 2013 - 04:58 PM

Just a bit of a teaching side note... read if you wish :)
Spoiler

Hope this helps you with making better logics in your programs :)

Edited by TheOriginalBIT, 11 January 2013 - 04:59 PM.


#25 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 11 January 2013 - 05:01 PM

View PostHeracles421, on 11 January 2013 - 04:47 PM, said:

That's why we're here, to help you out. And as you can see some users really help out a lot, and they also know a lot (TheOriginalBIT)
Only ~50 posts today :/ average is about 80... my peak is ~180... And thanx for you kind words :) I don't know everything though ;) thats my genius friend... :P

#26 marth010

  • New Members
  • 9 posts

Posted 11 January 2013 - 05:05 PM

Yeah i can definitely make those changes. I thought i tried that at the beginning and got an error, thought lua was a little weird that way. I guess not! After this problem is fixed I don't think anything else will need to be added

#27 Heracles421

  • Members
  • 258 posts

Posted 11 January 2013 - 05:06 PM

View PostTheOriginalBIT, on 11 January 2013 - 05:01 PM, said:

View PostHeracles421, on 11 January 2013 - 04:47 PM, said:

That's why we're here, to help you out. And as you can see some users really help out a lot, and they also know a lot (TheOriginalBIT)
Only ~50 posts today :/ average is about 80... my peak is ~180... And thanx for you kind words :)/> I don't know everything though ;)/> thats my genius friend... :P/>

Only 50? ONLY? I usually have like 15 a day, even less :P

#28 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 11 January 2013 - 05:08 PM

View Postmarth010, on 11 January 2013 - 05:05 PM, said:

Yeah i can definitely make those changes. I thought i tried that at the beginning and got an error, thought lua was a little weird that way. I guess not! After this problem is fixed I don't think anything else will need to be added

Sometimes errors can arise when doing it with variables since Lua allows any data type in a variable. however if you always make sure you store a boolean in the variable you won't get any errors... unless your logic is wrong...

#29 marth010

  • New Members
  • 9 posts

Posted 11 January 2013 - 05:19 PM

View PostTheOriginalBIT, on 11 January 2013 - 04:35 PM, said:

View Postmarth010, on 11 January 2013 - 04:32 PM, said:

It places one of the cobblestone from the slot, drops the rest, and then picks it back up. Essentially dropping all unwanted cobblestone by sacrificing a slot. It's where this problem starts actually

you could always do this
turtle.select( 1 )
turtle.drop( turtle.getItemCount( 1 ) - 1 )
This would drop all except for 1

Oh and I realize I had tried something like this before. For some reason, passing a parameter to turtle.drop() is bugged and ends up not dropping anything at all. At least in 1.33. Is it fixed in the later versions?

#30 Heracles421

  • Members
  • 258 posts

Posted 11 January 2013 - 05:22 PM

View Postmarth010, on 11 January 2013 - 05:19 PM, said:

Spoiler

Oh and I realize I had tried something like this before. For some reason, passing a parameter to turtle.drop() is bugged and ends up not dropping anything at all. At least in 1.33. Is it fixed in the later versions?

Yup, I've never had that error on the most rescent versions. You should change your current pack, FTB (Feed The Beast) is way better thy tekkit and is up to date. I assume you're using tekkit

#31 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 11 January 2013 - 05:24 PM

View Postmarth010, on 11 January 2013 - 05:19 PM, said:

View PostTheOriginalBIT, on 11 January 2013 - 04:35 PM, said:

View Postmarth010, on 11 January 2013 - 04:32 PM, said:

It places one of the cobblestone from the slot, drops the rest, and then picks it back up. Essentially dropping all unwanted cobblestone by sacrificing a slot. It's where this problem starts actually

you could always do this
turtle.select( 1 )
turtle.drop( turtle.getItemCount( 1 ) - 1 )
This would drop all except for 1

Oh and I realize I had tried something like this before. For some reason, passing a parameter to turtle.drop() is bugged and ends up not dropping anything at all. At least in 1.33. Is it fixed in the later versions?

That definitely sounds like a Bukkit issue to me!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users