undefined symbol params?
#1

PHP код:
if(!strcmp(cmdtext"/siren"true))
    {
        new 
skinid GetPlayerSkin(playerid);
     if(
skinid == 265 || skinid == 266 || skinid == 284)
        {
        new 
string[128], type;
        new 
VID GetPlayerVehicleID(playerid);
        if(
sscanf(params"d"type))// THIS IS THE ERROR LINE, THe params is undefined as said in the compilation result
        
{
            
SendClientMessage(playerid0xFFFFFFFF"USAGE: /siren [type]");
            
SendClientMessage(playerid0xFF9900FF"Type /credits to the person who made this");
            return 
1;
        }
        switch(
type)
        {
        case 
1:
            {
                if(
Siren[VID] == 1)
                {
                    
SendClientMessage(playerid0xFF0000FF"ERROR: This vehicle already has a siren!");
                    return 
1;
                }
                 new 
sendername[MAX_PLAYER_NAME];
                 
Siren[VID] = 1;
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                 
SirenObject[VID] = CreateObject(1864610.010.010.0000);
                 
AttachObjectToVehicle(SirenObject[VID], VID0.00.750.2750.00.10.0);
                 
format(stringsizeof(string), "* %s puts the siren on and begins to patrol"sendername);
                 
ProxDetector(30.0playeridstring0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF);
                return 
1;
            }
        case 
2:
            {
                if(
Siren[VID] == 1)
                {
                    
SendClientMessage(playerid0xFF0000FF"ERROR: This vehicle already has a siren!");
                    return 
1;
                }
                        
Siren[VID] = 1;
                        new 
sendername[MAX_PLAYER_NAME];
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
SirenObject[VID] = CreateObject(1864610.010.010.0000);
                        
AttachObjectToVehicle(SirenObject[VID], VID, -0.430.00.7850.00.10.0);
                        
format(stringsizeof(string), "* %s puts the siren on and begins to patrol"sendername);
                        
ProxDetector(30.0playeridstring0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF);
                        return 
1;
            }
        case 
3:
            {
                if(
Siren[VID] == 0)
                {
                    
SendClientMessage(playerid0xFF0000FF"ERROR: This vehicle doesn't have a siren on it!");
                    return 
1;
                }
                
Siren[VID] = 0;
                new 
sendername[MAX_PLAYER_NAME];
                
GetPlayerName(playeridsendernamesizeof(sendername));
                
DestroyObject(SirenObject[VID]);
                
format(stringsizeof(string), "* %s puts the siren off and is now off duty"sendername);
                
ProxDetector(30.0playeridstring0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF);
                return 
1;
            }
        default:
            {
                
SendClientMessage(playerid0xFF0000FF"ERROR: Invalid license type! /siren [type]");
                
SendClientMessage(playerid0xFF9900FF"Type: 1 = Roof, 2 = Inside, 3 = Off.");
            }
        }
    }
    else 
SendClientMessage(playerid0xFF0000FF"ERROR: You're not a member of the the Enforcer");
    return 
1;

Reply


Messages In This Thread
undefined symbol params? - by Neil. - 16.05.2012, 10:52
Re: undefined symbol params? - by doreto - 16.05.2012, 11:06
Re: undefined symbol params? - by JaKe Elite - 16.05.2012, 11:08
Re: undefined symbol params? - by Vince - 16.05.2012, 11:09
Re: undefined symbol params? - by Neil. - 16.05.2012, 11:17

Forum Jump:


Users browsing this thread: 3 Guest(s)