Jump to content

Need help creating a dialogue


Recommended Posts

Posted

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.

Image Dialogue.jpg

Posted (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 by Incrementis
typo
Posted

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.

 

Posted

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.

Posted

@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.

Posted

@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

 

Posted (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 by Ivellos
Posted (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 by szef
Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...