Dysoch / DyTech

DyTech, A mod for Factorio. Making the game much more complex!
http://www.factorioforums.com/forum/viewforum.php?f=43
Other
54 stars 46 forks source link

0.11.3 Lua not working + Tool box missing #188

Closed EurypteriD192 closed 9 years ago

EurypteriD192 commented 9 years ago

in Factorio 11.3 thecommand remote.call("DyTech-Core", "GUI") does not work with all modules activated.

Also the tool box for modular tools does not spawn on you, and unable to craft even though you research past steel

Morebits05 commented 9 years ago

Same here!

Marduke commented 9 years ago

in v0.11 was added multiplayer and that change calling script look at http://www.factorioforums.com/wiki/index.php?title=Console/Lua_commands

simply: write /c before command

Dysoch commented 9 years ago

yes, use this command: /c remote.call("DyTech-Core", "GUI")

Phant0mKnight commented 9 years ago

I have the same problem, no toolbox, no ability to craft any axe, and lua commands aren't working. Any attempt at using a lua command results in an error

/c remote.call("DyTech-Core", "GUI")

this usually gives me "Cannot execute command. Error: [string "remote.call("DyTech-Core", "GUI")"]:1: Error when running interface function DyTech-Core.GUI: ...ppData\Roaming\Factorio\mods\Dytech-Core|scripts/gui.lua:96: attempt to index field '?' (a nil value)"

/c remote.call("DyTech-Tools", "showCraftingGUI")

This results in "Cannot execute command. Error: [string "remote.call("DyTech-Tools", "showCraftingGUI")"]:1: Error when running interface function DyTech-Tools.showCraftingGUI: ...ppData\Roaming\Factorio\mods\Dytech-Tools|scripts/tools-database.lua:277: attempt to index field '?' (a nil value)"

Marduke commented 9 years ago

i have same error as phantomKnight with GUI, in factorio 11.1

Morebits05 commented 9 years ago

Same here too Dysoch!

Saturn812 commented 9 years ago

From the warnings in lua files, i assume GUI for tools and stuff is not yet fully implemented. I have a very dirty hack if you don't want to wait.

Open DyTech-Core\scripts\gui.lua and DyTech-Tools\scripts\tools-database.lua Find every function that takes PlayerIndex argument and add

if PlayerIndex == nil then PlayerIndex = 1 end

as the first line of the function

This should brake nothing even if some part of the module will be updated. I am not sure if i can link the files in the comment, but again, this is a very easy fix. Valid for 0.13.3 core and 2.2.0 tools

QiwGaming commented 9 years ago

No need to add that line for every function in those two lua files. It's enough to add it once, in tools-database.lua on the first line of the function called "function showCraftingGUI(PlayerIndex)". It's on the 275th line.

Saturn812 commented 9 years ago

It doesn't hurt anything anyway. I just looked for the functions which take PlayerIndex argument, but get called without one.

Andy2k commented 9 years ago

Same Problem.

Bankst commented 9 years ago

Is there a fix for this?