Ok, I am a hands-on learner and so I decided to try something simple, taking an existing mod and basically renaming it to a different name.
I grabbed the worldedit and worldedit_commands mods and used bash scripting to replace every instance of worldedit with worldedit2 and every instance of WorldEdit with WorldEdit2.
Here's the part that I can't figure out, despite this being the literal only change, worldedit2 doesn't load but worldedit does. Logically, doing this name change in every file should lead to a copy of the original mod but with a different name (in this case, worldedit2).
When trying to load worldedit2, I get this error.
2021-07-05 18:23:15: WARNING[Main]: Undeclared global variable "io" accessed at worldedit2:init.lua:21
2021-07-05 18:23:15: ERROR[Main]: ModError: Failed to load and run mod "worldedit2":
2021-07-05 18:23:15: ERROR[Main]: worldedit2:init.lua:21: attempt to index global 'io' (a nil value)
2021-07-05 18:23:15: ERROR[Main]: stack traceback:
2021-07-05 18:23:15: ERROR[Main]: worldedit2:init.lua:21: in function 'load_module'
2021-07-05 18:23:15: ERROR[Main]: worldedit2:init.lua:28: in main chunk
2021-07-05 18:23:15: ERROR[Main]: Check debug.txt for details.
So, can someone maybe help clarify how I failed in this simple renaming task? lol
What am I doing wrong here? (trying to learn some modding)
-
- Member
- Posts: 107
- Joined: Wed Jun 30, 2021 14:53
- GitHub: AmyMoriyama
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
Re: What am I doing wrong here? (trying to learn some modding)
hmm the answers are there:
* Check debug.txt for details.
* Undeclared global variable "io" accessed at worldedit2:init.lua:21
* Check debug.txt for details.
* Undeclared global variable "io" accessed at worldedit2:init.lua:21
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
-
- Member
- Posts: 107
- Joined: Wed Jun 30, 2021 14:53
- GitHub: AmyMoriyama
Re: What am I doing wrong here? (trying to learn some modding)
The error above is from the debug. The code between the original worldedit and the renamed worldedit (worldedit2) are exactly the same except for all instances of worldedit being replaced by worldedit2 and all instances of WorldEdit being replaced by WorldEdit2. Both "should" work identically, but obviously not. I haven't even made it to trying to modify stuff lol.Festus1965 wrote: ↑Tue Jul 06, 2021 01:48hmm the answers are there:
* Check debug.txt for details.
* Undeclared global variable "io" accessed at worldedit2:init.lua:21
Who is online
Users browsing this forum: No registered users and 14 guests