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

T21 Error

2 replies · 1,386 views · Started 16 July 2007

int ene_chk = 1;
while (true) {
int cycle = NumNPCs();
if (cycle <= ene_chk) {

Specifically this line:
int cycle = NumNPCs();

NumNPCs() is type int so i do not see what the problem is...😕

You'll get an undefined variable error because you never defined "NumNPCs()."

What you want to do is get the number of npcs on the screen, right? Well, that's a variable held inside the SCREEN object. So you need to go:

Screen->NumNPCs;

Or something. I'm not looking at the documentation now. Check the thread at the top of the scripting discussion forum.