Warning 203: symbol is never used
#1

Hi I'm Uberanwar and I need help with this warnings.

Quote:

C:\Users\sofie's\Desktop\CCNRRPG\pawno\include\cop-tools.inc(73) : warning 203: symbol is never used: "GiveFlashLight"
C:\Users\sofie's\Desktop\CCNRRPG\pawno\include\cop-tools.inc(73) : warning 203: symbol is never used: "GiveTazer"
C:\Users\sofie's\Desktop\CCNRRPG\pawno\include\cop-tools.inc(73) : warning 203: symbol is never used: "PutRiotShieldOnArm"
C:\Users\sofie's\Desktop\CCNRRPG\pawno\include\cop-tools.inc(73) : warning 203: symbol is never used: "PutRiotShieldOnBack"
C:\Users\sofie's\Desktop\CCNRRPG\pawno\include\cop-tools.inc(73) : warning 203: symbol is never used: "RemoveItems"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Warnings.

It's a include file called 'cop-tools.inc' I already put #include <cop-tools> in my gamemode and when I try in my server the command is not working.
Here's the script

PHP Code:
#include <a_samp>
/*
//////////////////////////////
//////////CopTools////////////
//////////by Geso/////////////
//////////////////////////////
These functions can be used with i.e.:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/arm", cmdtext, true, 4) == 0)
    {
        PutRiotShieldOnArm(playerid);
        return 1;
    }
    if (strcmp("/back", cmdtext, true, 5) == 0)
    {
        PutRiotShieldOnBack(playerid);
        return 1;
    }
    if (strcmp("/light", cmdtext, true, 6) == 0)
    {
        GiveFlashLight(playerid);
        return 1;
    }
    if (strcmp("/tazer", cmdtext, true, 6) == 0)
    {
        GiveTazer(playerid);
        return 1;
    }
    if (strcmp("/removeitems", cmdtext, true, 11) == 0)
    {
            if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
            if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        return 1;
    }
    return 0;
}
*/
RemoveItems(playerid)
{
            if(
IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
            if(
IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
}
PutRiotShieldOnBack(playerid)
{
        if(
IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
        
SetPlayerAttachedObject(playerid1863710, -0.10.18900272111);
}
PutRiotShieldOnArm(playerid)
{
        if(
IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
        
SetPlayerAttachedObject(playerid11863740.3000170270111);
}
GiveFlashLight(playerid)
{
        if(
IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        
SetPlayerAttachedObject(playerid2,1864150.10.02, -0.05000111);
}
GiveTazer(playerid)
{
        if(
IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        
SetPlayerAttachedObject(playerid2,1864250.120.02, -0.050045,1,1,1);

Can someone give me fixed version
Reply
#2

"warning 203: symbol is never used" basically means you are creating a variable or function but not using it.

For your functions, you can fix this by changing:
pawn Code:
RemoveItems(playerid)
{
            if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
            if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
}

PutRiotShieldOnBack(playerid)
{
        if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
        SetPlayerAttachedObject(playerid, 1 , 18637, 1, 0, -0.1, 0.18, 90, 0, 272, 1, 1, 1);
}

PutRiotShieldOnArm(playerid)
{
        if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
        SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
}

GiveFlashLight(playerid)
{
        if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        SetPlayerAttachedObject(playerid, 2,18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
}

GiveTazer(playerid)
{
        if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        SetPlayerAttachedObject(playerid, 2,18642, 5, 0.12, 0.02, -0.05, 0, 0, 45,1,1,1);
}
to
pawn Code:
stock RemoveItems(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
    if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
}

stock PutRiotShieldOnBack(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
    SetPlayerAttachedObject(playerid, 1 , 18637, 1, 0, -0.1, 0.18, 90, 0, 272, 1, 1, 1);
}

stock PutRiotShieldOnArm(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
    SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
}

stock GiveFlashLight(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
    SetPlayerAttachedObject(playerid, 2,18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
}

stock GiveTazer(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
    SetPlayerAttachedObject(playerid, 2,18642, 5, 0.12, 0.02, -0.05, 0, 0, 45,1,1,1);
}
Reply
#3

Thank you so much Hawky, I'll try it again
Reply
#4

No problem. This warning won't cause major problems for your script, but it'll just point out functions and variables which have no use in your script.
Reply
#5

I don't understand why it's still not working. I changed it already.
Reply
#6

Basically you're changing the contents of "cop-tools.inc" to this:
pawn Code:
#include <a_samp>

/*
//////////////////////////////
//////////CopTools////////////
//////////by Geso/////////////
//////////////////////////////

These functions can be used with i.e.:

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/arm", cmdtext, true, 4) == 0)
    {
        PutRiotShieldOnArm(playerid);
        return 1;
    }
    if (strcmp("/back", cmdtext, true, 5) == 0)
    {
        PutRiotShieldOnBack(playerid);
        return 1;
    }
    if (strcmp("/light", cmdtext, true, 6) == 0)
    {
        GiveFlashLight(playerid);
        return 1;
    }
    if (strcmp("/tazer", cmdtext, true, 6) == 0)
    {
        GiveTazer(playerid);
        return 1;
    }
    if (strcmp("/removeitems", cmdtext, true, 11) == 0)
    {
            if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
            if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        return 1;
    }
    return 0;
}
*/


stock RemoveItems(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
    if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
}

stock PutRiotShieldOnBack(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
    SetPlayerAttachedObject(playerid, 1 , 18637, 1, 0, -0.1, 0.18, 90, 0, 272, 1, 1, 1);
}

stock PutRiotShieldOnArm(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
    SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
}

stock GiveFlashLight(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
    SetPlayerAttachedObject(playerid, 2,18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
}

stock GiveTazer(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
    SetPlayerAttachedObject(playerid, 2,18642, 5, 0.12, 0.02, -0.05, 0, 0, 45,1,1,1);
}
You will then need to save and re-compile your script
Reply
#7

The command is still not working. Can you go to my server so we can chat? I'll pm you the server ip
Reply
#8

Ok, open your Pawno(folder)>pawno.exe>Open>YourGameMode/FilterScript. Then compile it!
Reply
#9

open new notepad and replace from http://pastebin.com/Gb15wKhh and rename CopTools.inc
open script,add at the top of script #include <CopTools> and add command
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/arm", cmdtext, true, 4) == 0)
    {
        PutRiotShieldOnArm(playerid);
        return 1;
    }
    if (strcmp("/back", cmdtext, true, 5) == 0)
    {
        PutRiotShieldOnBack(playerid);
        return 1;
    }
    if (strcmp("/light", cmdtext, true, 6) == 0)
    {
        GiveFlashLight(playerid);
        return 1;
    }
    if (strcmp("/tazer", cmdtext, true, 6) == 0)
    {
        GiveTazer(playerid);
        return 1;
    }
    if (strcmp("/removeitems", cmdtext, true, 11) == 0)
    {
            if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
            if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)