warning 203: symbol is never used
#1

warning 203: symbol is never used: "difference"?

PHP код:
 new difference 
Reply
#2

add to your script

#pragma unused difference
Reply
#3

now i got it

(51) : error 017: undefined symbol "difference"
(21190) : warning 203: symbol is never used: "difference"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


line 51 is ur script and 2nd mine old.
Reply
#4

Quote:
Originally Posted by yusei
Посмотреть сообщение
add to your script

#pragma unused difference
Don't just tell him what to do, explain to him what the problem is.

Basically, the script your using has a variable which is used to store a type of data, that warning simply means that you've made it, but you're not using it anywhere yet.

Yes doing

pawn Код:
#pragma unused difference
But when it comes to the time when you need to use it, you will get warnings, so once you get a undefined error warning, simply remove that directive and you should be okay. The directive is that code above.
Reply
#5

Quote:
Originally Posted by blackdragon1
Посмотреть сообщение
now i got it

(51) : error 017: undefined symbol "difference"
(21190) : warning 203: symbol is never used: "difference"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


line 51 is ur script and 2nd mine old.
Could you please copy and post line 51?
Reply
#6

Just remove unused line!? (21190)
Reply
#7

PHP код:
51#pragma unused difference
21190: new difference 
there is full code:

PHP код:
forward AntiCash();
public 
AntiCash()
{
    foreach(
Playeri)
    {
        if(
GetPlayerMoney(i) != PlayerCash[i])
        {
            new 
difference;
            
ResetPlayerMoney(i);
            
GivePlayerMoney(i,PlayerCash[i]);
            return 
1;
        }
    }
    return 
1;

Reply
#8

Oh I see what has happened here, I cannot remember specifically on how to remove the warning, there is away around it, but remove line 51 for now, you will get your original warning but try and ignore that for now. Hopefully someone will know what the problem is and post it. I've had this MANY times before, but I forget how to remove it.
Reply
#9

pawn Код:
forward AntiCash();
public AntiCash()
{
    foreach(Player, i)
    {
        if(GetPlayerMoney(i) != PlayerCash[i])
        {
            ResetPlayerMoney(i);
            GivePlayerMoney(i,PlayerCash[i]);
            return 1;
        }
    }
    return 1;
}
Remove: 51: #pragma unused difference
Reply
#10

Okay I have failed, I didn't see that you posted the full code.

To fix all errors, remove line 51, and remove that 'new difference;' in the code.

Fixed:

pawn Код:
forward AntiCash();
public AntiCash()
{
    foreach(Player, i)
    {
        if(GetPlayerMoney(i) != PlayerCash[i])
        {
            ResetPlayerMoney(i);
            GivePlayerMoney(i,PlayerCash[i]);
            return 1;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)