[0.10.1 MINOR] help function and createentity train

This subforum contains all the issues which we already resolved.
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

[0.10.1 MINOR] help function and createentity train

Post by FreeER »

So, I thought I'd use the new makefile method to make a list of the help 'documentation' and found that these do not have a help method/property, or at least I've no idea how to find it lol.

Code: Select all

Lua/Entity
  Lua/Player
  Lua/Train
Lua/GUI (Lua/GuiElement?)
Lua/Inventory
Also, in the control script you have to access 'help' as a property, not as a function, aka whatever.help and not whatever.help() (but you do have to use whatever.help() in the console...), not sure if that was actually intended...

While testing I found that game.createentity{name="diesel-locomotive", position=game.findnoncollidingposition("diesel-locomotive", game.player.position, 100, 1)} will fail "for an unknown reason", unless there are tracks close enough for it to be placed on, in which case it works (basically...I've found the reason lol).

script I used for testing if you care to see it
script
script output cause why not
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.10.1 MINOR] help function and createentity train

Post by cube »

Thanks for the reports.
  • I added the missing help methods for 0.10.2.
  • the help methods are mehtods everywhere. you use it as a property only as an argument to pcall (it takes a function as an argument and calls it -- basically it adds the method call brackets by itself)
  • Train can be only placed on rails, that is a feature :-) I changed the error message so that it doesn't sound so "unknown reason" :-)
I have no idea what I'm talking about.
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.10.1 MINOR] help function and createentity train

Post by FreeER »

cube wrote:I added the missing help methods for 0.10.2.
Awesome thanks!
cube wrote:you use it as a property only as an argument to pcall
...this makes me feel like an idiot now :lol:
cube wrote:Train can be only placed on rails, that is a feature :)
I did assume that :) Of course it could be argued that mining drills 'can only be placed on ore' but I wouldn't really want that implemented in createentity :lol: A more descriptive error message which was the reason I mentioned it though, so thanks for that too :P
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.10.1 MINOR] help function and createentity train

Post by cube »

FreeER wrote:A more descriptive error message which was the reason I mentioned it though, so thanks for that too :P
It won't be more descriptive, it just won't say that it is an unknown reason :-)
I have no idea what I'm talking about.
Post Reply

Return to “Resolved Problems and Bugs”