Hello and loud room

Hello: I’ve just registered in this forum and I’m from Italy, so forgive me if I make mistakes :slight_smile: . I’m going to translate Zork I in Italian with Inform 6 (rewriting it, since the inform7 version is completely different and the decompiled version created with reform sucks) and I’ve created a lot of rooms, but I’m stuck with the Loud Room, where if you write something it will answer with the echo (like “Examine Platinum bar”, "bar bar … until you type ‘echo’). I tried to use the solution in DM4 in chapter 2.5 “Reading into arrays from the keyboard”, but I don’t know where I have to call the function. I’ve also tried with a BeforeParsing routine, but it didn’t work :confused: : has anybody ever created something like that? Thanks a lot and bye from Italy!

I’ve solved it by myself: this is the code if someone gets stuck in my same problem:

Constant LUNGH_MAX 18;
Array inputP->LUNGH_MAX;
Array Check->LUNGH_MAX;

[ LookRoutine;
if (location==Loud_Room&&Loud_Room.echo==false)!where there is echo
ECOOO();
];

[ ECOOO flag;
while (flag==0) {
print “^>”;
ReadArray(inputP, LUNGH_MAX);
if (Ovest(inputP)==1) {flag=1; <>;}
if (Est(inputP)==1) {flag=1; <>;}
if (Up(inputP)==1) {flag=1; <>;}
print (PrintStringArray) inputP, "… ", (PrintStringArray) inputP, “…”;
}
];

[ Ovest inp;
PrintToBuffer(Check, LUNGH_MAX, “vai a ovest”);!Go west in Italian
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “vai a o”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “vai a w”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “ovest”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “o”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “w”);
if ((CmpStr(inp, Check))==1) return true;
return false;
];

[ Est inp;
PrintToBuffer(Check, LUNGH_MAX, “vai a est”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “vai a e”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “e”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “est”);
if ((CmpStr(inp, Check))==1) return true;
return false;
];

[ Up inp;
PrintToBuffer(Check, LUNGH_MAX, “vai su”);!go up in Italian
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “vai s@u"); if ((CmpStr(inp, Check))==1) return true; PrintToBuffer(Check, LUNGH_MAX, "su"); if ((CmpStr(inp, Check))==1) return true; PrintToBuffer(Check, LUNGH_MAX, "s@u”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “u”);
if ((CmpStr(inp, Check))==1) return true;
PrintToBuffer(Check, LUNGH_MAX, “up”);
if ((CmpStr(inp, Check))==1) return true;
return false;
];