Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Script Loading

9 replies · 1,607 views · Started 02 January 2007

Okay, scripts only seem to save if they're in the buffer. When you import a new buffer, the scripts aren't there. (or they just don't appear) Also, Importing ASM scripts won't show up either. I don't think this should be happening...😡😡😡:shakeno:😞😛oke:
Sorry about the smiley overkill.

Let me try to re-interpret what he's saying...

I believe he's saying that when you compile a ZScript, it'll save onto the quest, but when you load a new one, it gives you the message that the buffer (what the Script is loaded to) must be cleared. If you say yes, it clears the buffer, BUT it also erases ANY scripts you previously saved. In other words.... IT ONLY ALLOWS YOU TO USE ONE SCRIPT IN A QUEST, AND THAT'S IT. It's EXTREMELY annoying for me, because I want to use both the Vacuum and Chaser-Trap scripts in one of my quests, but since it erases one after I load the other, I can only have one or the other in my quest, not both.

pikaguy900 wrote:Let me try to re-interpret what he's saying...

I believe he's saying that when you compile a ZScript, it'll save onto the quest, but when you load a new one, it gives you the message that the buffer (what the Script is loaded to) must be cleared. If you say yes, it clears the buffer, BUT it also erases ANY scripts you previously saved. In other words.... IT ONLY ALLOWS YOU TO USE ONE SCRIPT IN A QUEST, AND THAT'S IT. It's EXTREMELY annoying for me, because I want to use both the Vacuum and Chaser-Trap scripts in one of my quests, but since it erases one after I load the other, I can only have one or the other in my quest, not both.


YES!That's exactly what I was trying to say!... And you can have more than one script if and only if they're all in the buffer together. Also, a similar thing happens when you import an ASM script. It just says there's no script loaded.

Are the scripts actually being unloaded, or is it just erasing their names? That's all I've seen it do; for me, the scripts have always continued working even after their names vanish.
I'll look into it, in any case. Doesn't seem like it should be too hard to fix.

Still, even if it isn't a bug, it's strange behavior. There should at least be something that says that there is actually a script in a slot. The "none" is misleading and confusing. I'd rather not have to keep track of which script slots I've used via an external source. :shrug:

Hm...

std::map<string, vector<Opcode *> >::iterator isitthere = scripts.find(ffcmap[i].second);
if(isitthere == scripts.end())
ffcmap[i].second = "";

That's where all the names are getting erased.
Any other developer know what this is intended to do? It can't find any purpose for it other than to do exactly what it's doing, and commenting it out doesn't seem to cause any problems. Is this behavior actually intentional?