Ivellos Posted November 2 Posted November 2 Hello everyone. Can someone help me with something? I'm trying to create a dialogue for a new mod, and I keep getting an error. What does this error "ERROR: illegal 6-byte write (Mugluk) offset 716 of 173-byte file IVEitems/Dialog/Mugluk.d" means? And what about the error "write out of bounds"? Can someone check the structure of this simple dialogue? It seems correct to me, it is a very simple one. Quote
Ivellos Posted November 3 Author Posted November 3 Nevermind, the problem was solved in discord with the help of dark0dave Quote
Incrementis Posted November 3 Posted November 3 (edited) Hi Ivellos, Could you please tell the solution, so that people who have the same/similar problem and look here, can also find an answer, thanks. Edited November 3 by Incrementis typo Quote
jastey Posted November 3 Posted November 3 The problem was in the tp2: COMPILE ~IVEitems/Dialog/Mugluk01.d~ WRITE_ASCII DIALOG ~Mugluk01~ The WRITE_ASCII doesn't make sense here and needed to be removed. @Ivellos I'd still be interested how the tp2 of the tutorial looked like. I am sure the WRITE_ASCII was there in another context. Quote
Ivellos Posted November 4 Author Posted November 4 (edited) @jastey The tp2 file of the tutorial I based on looked like this Edited November 4 by Ivellos Quote
jastey Posted November 4 Posted November 4 Thanks! It's what I thought; if you look at it you see that the WRITE_ASCII is below the copying of the cre file, not the compilation of the d-file. It assignes the dlg to the quest character, so the cre actually talks with this dialogue. Quote
Ivellos Posted November 4 Author Posted November 4 @Incrementis The problem was that in my .tp2 file, the line "WRITE_ASCII DIALOG" was not below the respective .cre file. So erasing that line or placing it below the command to copy the .cre file made it install correctly. Quote
Ivellos Posted November 4 Author Posted November 4 @jastey Exactly! So that is what the "write out of bounds" error means. I was really confused by it. Quote
argent77 Posted November 4 Posted November 4 @Ivellos It is good style to specify the max. size (i.e. field size) of the string you want to write. Otherwise you risk out-of-bounds writes or, even more difficult to troubleshoot, a partially overwritten target string if the source string is shorter than 8 characters. Example: WRITE_ASCII DIALOG ~IZMendak~ #8 Quote
Ivellos Posted November 4 Author Posted November 4 (edited) Thanks for the tip @argent77! I read that later in the "A course on WEIDU", which I did not finish yet. I am still very much new to this, learning how WEIDU works and stuff. Glad to see a lot of people trying to help new modders! Edited November 4 by Ivellos Quote
szef Posted November 15 Posted November 15 (edited) On 11/4/2024 at 9:51 PM, argent77 said: @Ivellos It is good style to specify the max. size (i.e. field size) of the string you want to write. Always? Even if my new .cre file does not have a typed dialog field, but is to be entered by weidu? I know that if I want to overwrite some script name: WRITE_ASCII DEATHVAR then must give: #32 ? But about the DIALOG? Edited November 15 by szef Quote
argent77 Posted November 15 Posted November 15 It's ultimatively your decision. But without it you'll always run the risk of introducing subtle bugs or even breaking your mod if you decide to update your code or resources at a later date. Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.