Foreach Hep plz
#1

foreach (new botid : Bot)
{
}
I want to use this function but when i use it says unidentified Foreach and botid

This is code
foreach (new botid : Bot)
{
if(!strcmp(pName[botid],"Emelie"))
{
if(bottargeted == 1)
{
bottargeted=2;
ApplyAnimation(botid,"PED","handsup",3.1,0,1,1,1,0 ,1);
}
else if(bottargeted==0)
{
if(GetPlayerSpeed(botid,true) > 0) ApplyAnimation(botid,"PED","WOMAN_walkpro",4.1,1,1 ,1,1,1);
else ApplyAnimation(botid,"PED","woman_idlestance",3.1, 1,1,1,1,0,1);
}
}
}
Reply
#2

Learn to indent. For ours and your own benefit. You're going to have endless problems if you don't indent.
Reply
#3

i know but i think its foreach.inc problem can Some one give me link that can help
Reply
#4

You haven't even explained your problems. You've just said 'foreach' and thrown some code in. How are we meant to know what your problem is? The foreach code doesn't even have anything in it..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)