Quote:
|
Originally Posted by PM
The if instead of while question:
Well, you _could_ do this:
Code:
new entid = -1
while (true)
{
entid = find_ent_by_tname(entid, "door")
if (!entid) // entid zero!
break; // stop loop
force_use(id, entid)
}
But I don't like it 
|
Yeah, I definitely don't like it too... hehe
Quote:
|
Originally Posted by PM
I think the code is right as I've written it; (you can test it by running it, the warning doesn't prevent code generation). To prevent the warning, you can either try to wrap the assignment in extra parenthesis; if that doesn't silence the compiler, you could try rewriting the line of code to this:
Code:
while ((entid = find_ent_by_tname(entid, "door")) != 0)
|
Man, you're very good at it... Now, I believe the code is completely right like you, lol, and the extra "()" worked exactly as you said it would be...
It is
perfect... Thanks once more... My tutor

hehehe...