What am I doing wrong here? (trying to learn some modding)

Post Reply
AmyMoriyama
Member
Posts: 107
Joined: Wed Jun 30, 2021 14:53
GitHub: AmyMoriyama

What am I doing wrong here? (trying to learn some modding)

by AmyMoriyama » Post

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

User avatar
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)

by Festus1965 » Post

hmm the answers are there:
* 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)

AmyMoriyama
Member
Posts: 107
Joined: Wed Jun 30, 2021 14:53
GitHub: AmyMoriyama

Re: What am I doing wrong here? (trying to learn some modding)

by AmyMoriyama » Post

Festus1965 wrote:
Tue Jul 06, 2021 01:48
hmm the answers are there:
* Check debug.txt for details.
* Undeclared global variable "io" accessed at worldedit2:init.lua:21
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.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests