Console question

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Console question

Post by FreeER »

I've noticed that the console does not always show the full error: (I'm on a laptop and using win 64bit 2.10. screen resolution is 1366 x 768). I noticed this more with my testing install (because I use the console far more) which is the zip rather than the installation of factorio and starts in windowed mode and not fullscreen.

for example if I were to type

Code: Select all

game.createentity{name="stone-furnace",{0,0}}
the display shows:

Code: Select all

Cannot execute command. Error: [string "game.createentity{name="stone-furnace",{0,0})..."]:1: bad argument #-1
whereas if I make the window wider it shows more

Code: Select all

Cannot execute command. Error: [string "game.createentity{name="stone-furnace",{0,0})..."]:1: bad argument #-1 to 'createentity' (table expected, not nil)
I've also noticed that if I make the window 'height' smaller it displays more of the error.
also the console text is behind the 'in-hand' inventory on the right and the research menu (once it scrolls up).

If you'd like I can easily post pictures displaying what I mean

edit: also noticed that the console has a limit I can not type

Code: Select all

game.createentity{name="stone-furnace",position={x=game.getplayer().position.x,y=game.getplayer().position.y}}
because it stops at

Code: Select all

game.createentity{name="stone-furnace",position={x=game.getplayer().position.x,y=game.getplayer().po
I noticed this because I created a furnace at 0,0 right after starting and I got stuck inside the furnace, I wanted to test it again by using the player positon rather than 0,0.
<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

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Console question

Post by ficolas »

about the console limit, you can "compress" the variables into smaller variables, for example, before typing it, you type

Code: Select all

x=game.getplayer().position.x
But that is annoying sometimes :S

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Console question

Post by kovarex »

Noted, we will try to do something with that.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Console question

Post by FreeER »

thanks :)
Not a big problem but it would probably make things easier while debugging my lua :lol:
<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

Post Reply

Return to “Gameplay Help”