This'll be fixed properly in the next release
#541
Posted 23 January 2013 - 12:20 AM
This'll be fixed properly in the next release
#542
Posted 23 January 2013 - 12:50 AM
#543
Posted 23 January 2013 - 03:19 AM

will become this..

This'll be in the next release.
Edit: Actually, it'll be 1-indexed, not 0-indexed like in that picture.
#544
Posted 23 January 2013 - 08:39 AM
Sorry about the low quality!
Script is written for the next version (0.1.3), so I'll add the script as a download.
Hopefully Cruor or Lyqyd will come up with a nicer version of this script that'll be included as a default program in OCS
#545
Posted 23 January 2013 - 10:15 AM
Mikeemoo, on 23 January 2013 - 12:04 AM, said:
That's a bit of an oversight on my part. I've tried to add nicer error handling in there, but I guess some things should return null instead of errors..
The offending code will be in:
/ocs/apis/sensor
you can see that if the peripheral throws an ocs_error event, it'll throw an error() in the lua.
I can fix this for the next release, however, as a workaround I recommend one of the two:
1) copy ocs/apis/sensor down to the root of your computer and edit that lua method there so it returns null instead of throwing an error
or..
2) use pcall on the sensor instead.
<immibis> pcall(function, arguments...) -> status, return_values... <immibis> status is true for success, false for error <immibis> if it errored, there'll be one return_value, and that's the error message
I would suggest that we return nil, "error text".
#546
Posted 23 January 2013 - 10:16 PM
#547
Posted 23 January 2013 - 10:30 PM
#548
Posted 24 January 2013 - 02:15 AM
abihoooo, on 23 January 2013 - 10:16 PM, said:
Which liquids are you trying? Water, Milk, Lava, Biomass, and Honey all work fine for me in 1.2., Fuel, and Oil still crash sensorview serverside, but not in single player. I even have the "Liquid Metals" mod and all the liquids work from it too.
#549
Posted 24 January 2013 - 02:26 AM
#550
Posted 24 January 2013 - 03:32 AM
It'll TRY to give you a nice friendly name to look at, however if it fails it'll give a more.. codey name (such as buildcraft.fuel). Either way, the name it gives should stay consistent.
This'll be in 0.1.3, which I think i'll release soon because there's no new features but quite a few bug fixes.
Edit: I think it'll return RawName and Name, where Name will try to give a friendly name, but will fall back to RawName is it cant get it.
#551
Posted 24 January 2013 - 04:37 AM
#552
Posted 24 January 2013 - 04:54 AM
tabs, on 24 January 2013 - 04:37 AM, said:
#553
Posted 24 January 2013 - 05:22 AM
In return I'll share the code for a function that will take the location and dimensions of any surface (most often will be used to describe a monitor screen, I guess) and an entity position and rotation values, which returns the x,y coordinates they're looking at on that surface.
I'll need to test it first though!
Should lead to some fun applications.
#554
Posted 24 January 2013 - 05:22 AM
tabs, on 24 January 2013 - 04:37 AM, said:
Added Pitch, Yaw and YawHead. Untested, but this should make it into 0.1.3 once I've tested it
#555
Posted 24 January 2013 - 05:25 AM
I've tried the ones posted in this thread (like 0.06.1 and 0.06.3) but not sure if it's my fault they don't work
Thanks.
#556
Posted 24 January 2013 - 05:26 AM
Speedfister, on 24 January 2013 - 05:25 AM, said:
I've tried the ones posted in this thread (like 0.06.1 and 0.06.3) but not sure if it's my fault they don't work
Thanks.
With the earlier versions you mention, you can probably access the sensor directly through the peripheral API like you would with any other peripheral, so you dont need to load the sensor api.
However, I unfortunately wont be able to support you with this and I know the earlier versions have quite a few little bugs in them, so I fully recommend upgrading if you can.
#558
Posted 24 January 2013 - 05:35 AM
Mikeemoo, on 24 January 2013 - 05:26 AM, said:
Speedfister, on 24 January 2013 - 05:25 AM, said:
I've tried the ones posted in this thread (like 0.06.1 and 0.06.3) but not sure if it's my fault they don't work
Thanks.
With the earlier versions you mention, you can probably access the sensor directly through the peripheral API like you would with any other peripheral, so you dont need to load the sensor api.
However, I unfortunately wont be able to support you with this and I know the earlier versions have quite a few little bugs in them, so I fully recommend upgrading if you can.
Ok, any chance you could give a tiny little example that would show me if the version I have is working or not?
When I tried to update MC and my mods, with their random block ID's, my world didn't quite work as it should I'm afraid. Will have to play like this til I get bored and want to start something fresh
#559
Posted 24 January 2013 - 05:42 AM
Speedfister, on 24 January 2013 - 05:35 AM, said:
Mikeemoo, on 24 January 2013 - 05:26 AM, said:
Speedfister, on 24 January 2013 - 05:25 AM, said:
I've tried the ones posted in this thread (like 0.06.1 and 0.06.3) but not sure if it's my fault they don't work
Thanks.
With the earlier versions you mention, you can probably access the sensor directly through the peripheral API like you would with any other peripheral, so you dont need to load the sensor api.
However, I unfortunately wont be able to support you with this and I know the earlier versions have quite a few little bugs in them, so I fully recommend upgrading if you can.
Ok, any chance you could give a tiny little example that would show me if the version I have is working or not?
When I tried to update MC and my mods, with their random block ID's, my world didn't quite work as it should I'm afraid. Will have to play like this til I get bored and want to start something fresh
Try something like this:
local sensor = peripheral.wrap("left")
print(textutils.serialize(sensor.getTargets()))
If it spits out a load of junk, your version is working #560
Posted 24 January 2013 - 06:04 AM
Mikeemoo, on 24 January 2013 - 05:42 AM, said:
Speedfister, on 24 January 2013 - 05:35 AM, said:
When I tried to update MC and my mods, with their random block ID's, my world didn't quite work as it should I'm afraid. Will have to play like this til I get bored and want to start something fresh
Try something like this:
local sensor = peripheral.wrap("left")
print(textutils.serialize(sensor.getTargets()))
If it spits out a load of junk, your version is working Awesome, it worked
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











