PDA

View Full Version : T21 Error



ShadowMancer
07-16-2007, 06:24 PM
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...:confused:

C-Dawg
07-16-2007, 06:37 PM
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.

ShadowMancer
07-16-2007, 08:06 PM
yep that did it :)

Screen->NumNPCs();

Thanks Dawg