error 010: invalid function or declaration
#1

PHP код:
function ZombieInfect(playerid)
{
    
gteam[playerid] = TEAM_ZOMBIE;
    
TogglePlayerControllable(playerid,0);
    
ClearAnimations(playerid);
    
ResetPlayerWeapons(playerid);
    
GivePlayerWeapon(playerid,4,1);
    
SetPlayerSkin(playerid,162);
    
SetPlayerTeam(playerid,TEAM_ZOMBIE);
    
SetPlayerColor(playerid,COLOR_ZOMBIE);
    
TogglePlayerControllable(playerid,1);
    
SetPlayerPos(playerid,x222,y222,z222+0.5);
    
SetPlayerFacingAngle(playerid,angle222);
    foreach(
Player,i)
    {
        
PlayerPlaySound(i,1132,0.0,0.0,0.0);
        
PlayerPlaySound(i,1184,0.0,0.0,0.0);
    }
    
     return 
1;

ERROR CODE
PHP код:
zma.pwn(2357) : error 010invalid function or declaration
zma
.pwn(2371) : error 010invalid function or declaration
zma
.pwn(2377) : error 010invalid function or declaration 
Reply
#2

Well, In LINE: 2357, You don't type function. You just type it like,

ZombieInfect(playerid)
{ ..
..
..

And in LINE: 2371, I guess you didn't define what is foreach.

And in LINE: 2377, I guess that's related to foreach which you didn't define, that's why it gives you an error.
Reply
#3

Thanks bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)