SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 12/06/2009, 06:25 PM   #1
JoeDaDude
Gangsta
 
Join Date: Apr 2008
Posts: 727
Reputation: 0
Default Undefined symbol

pawn Code:
forward IsACopCar(carid);

---------------------------------------

new index;
new cmd[20];
cmd = strtok(cmdtext, index);
if (strcmp(cmd, "/cuff", true) == 0)
{
new tmp[20];
tmp = strtok(cmdtext, index);
if (strlen(tmp))
{
id = strval(tmp);
if (IsPlayerConnected(id))
{
if (IsACopCar(carid))
{
SendClientMessage(id, 0xFFFFFFFFF, "You have been cuffed and cannot move");
TogglePlayerControllable(id,0);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You're not in a registered cop car");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player is not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[Usage]: /cuff [playerid/name]");
}
return 1;
}
if (strcmp(cmd, "/uncuff", true) == 0)
{
new tmp[20];
tmp = strtok(cmdtext, index);
if (strlen(tmp))
{
id = strval(tmp);
if (IsPlayerConnected(id))
{
SendClientMessage(id, 0xFFFFFFFFF, "You have been uncuffed");
TogglePlayerControllable(id,1);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[Usage]: /uncuff [playerid/name]");
}
return 1;
}

---------------------------------------

public IsACopCar(carid)
{
    new vehicle = GetVehicleModel(carid);
    if(vehicle == 597)
    {
        return 1;
    }
    return 0;
}

What is wrong?

Code:
C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(37) : error 017: undefined symbol "carid"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Does anyone have a solution
JoeDaDude is offline  
Old 12/06/2009, 07:29 PM   #2
JoeDaDude
Gangsta
 
Join Date: Apr 2008
Posts: 727
Reputation: 0
Default Re: Undefined symbol

Any help please?

EDIT: Sorry double post
JoeDaDude is offline  
Old 12/06/2009, 07:47 PM   #3
KyleSmith
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,171
Reputation: 242
Default Re: Undefined symbol

new carid;
KyleSmith is offline  
Old 12/06/2009, 07:49 PM   #4
JoeDaDude
Gangsta
 
Join Date: Apr 2008
Posts: 727
Reputation: 0
Default Re: Undefined symbol

Tried that to many errors
JoeDaDude is offline  
Old 12/06/2009, 08:18 PM   #5
pen_theGun
Big Clucker
 
pen_theGun's Avatar
 
Join Date: Jan 2008
Posts: 168
Reputation: 0
Default Re: Undefined symbol

(IsACopCar(carid)) // 'carid' not defined

IsACopCar( GetPlayerVehicleID( id ) ) // here is no need to define something

pawn Code:
if (IsPlayerConnected(id))
        {
            if (IsACopCar( GetPlayerVehicleID( id ) )) // <=====
            {
                SendClientMessage(id, 0xFFFFFFFFF, "You have been cuffed and cannot move");
                TogglePlayerControllable(id,0);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, 0xFF0000AA, "You're not in a registered cop car");
            }
        }
__________________



pen_theGun is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined symbol GangsTa_ Help Archive 5 06/06/2010 05:13 AM
undefined symbol help please darkmagic2 Help Archive 2 04/09/2009 08:05 PM
[DM] undefined symbol Dawior Help Archive 9 02/09/2009 12:52 PM
undefined symbol newkeys? aspire5630 Help Archive 4 31/08/2009 12:19 PM
I get this error (Undefined Symbol) aspire5630 Help Archive 1 28/04/2009 12:13 AM


All times are GMT. The time now is 12:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.