afew errors...
#1

error 021: symbol already defined: "ishex"

PHP Code:
stock ishex(str[])
{
    
//P:3("ishex called: \"%s\"", str);
    
new
        
i,
        
cur;
    if (
str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) 2;
    while (
str[i])
    {
        
cur str[i++];
        if (!((
'0' <= cur <= '9') || ('A' <= cur <= 'F') || ('a' <= cur <= 'f'))) return 0;
        
//if ((cur < '0') || ('9' < cur < 'A') || ('F' < cur < 'a') || (cur > 'f')) return 0;
    
}
    return 
1;

error 021: symbol already defined: "OnObjectMoved"
PHP Code:
public OnObjectMoved(objectid)
{
    for (new 
0MAX_BOOTHS++) if (g_BoothUsed[i] && g_BoothObject[i] == objectid) {
        
DestroyObject(g_BoothObject[i]);
        return 
SetTimerEx("UpdateBooth"3000false"dd"Booth_GetPlayer(i), i);
    }
    if (
objectid == A51NorthernGate)
    {
        
// Check if the northern gate was closing
        
if (NorthernGateStatus == GATES_CLOSING)
        {
            
// Set status flag for northern gates
            
NorthernGateStatus GATES_CLOSED;
        }
        else
        {
            
// Set status flag for northern gates
            
NorthernGateStatus GATES_OPEN;
        }
    }
    
// Check if the object that moved was the eastern gate
    
else if (objectid == A51EasternGate)
    {
        
// Check if the eastern gate was closing
        
if (EasternGateStatus == GATES_CLOSING)
        {
            
// Set status flag for eastern gate
            
EasternGateStatus GATES_CLOSED;
        }
        else
        {
            
// Set status flag for eastern gate
            
EasternGateStatus GATES_OPEN;
        }
    }
    foreach(new 
iPlayer)
    {
        if(
objectid == gRocketObj[i])
        {
            new 
Float:xFloat:yFloat:z;
            
GetObjectPos(gRocketObj[i], xyz);
            
CreateExplosion(xyz113.0);
            
DestroyObject(gRocketObj[i]);
        }
    }
    return 
1;

and many errors in this one
PHP Code:
forward OnPlayerPressButton(playeridbuttonid)
{
    
// New SASD interior.
    
for(new 0sizeof(DocButton); i++) {
        if (
buttonid == DocButton[i]) {
            if(
IsLawEnforcement(playerid)) {
                
OpenDocAreaDoors(i1);
                
SetTimerEx("OpenDocAreaDoors"5000false"ii"i0);
            }
            else {
                
SendClientMessageEx(playeridCOLOR_GREY"Access denied");
                break;
            }
        }
    }
    if(
buttonid == DocCPButton[0] || buttonid == DocCPButton[1])
    {
        if(!
IsLawEnforcement(playerid)) return SendClientMessageEx(playeridCOLOR_GREY"Access denied");
        
ShowDocPrisonControls(playerid0);
    }
    return 
false;

Reply
#2

Look at the error message, what do you think it means?
Reply
#3

that its defined two times....
Reply
#4

so what to do to fix that, also about the 3rd code
Reply
#5

You already have ishex & OnObjectMoved funcs/callbacks in your script. Find their duplicates and remove them.

Regarding the 3rd code, posting the error messages would help us find what's wrong faster.
Reply
#6

For 1st and 2nd, check all of your includes and other filterscripts, there is a possibility that there are functions with same name already defined or not forwarded properly.

As for the 3rd error, replace "forward" with "public" and it should work.
Reply
#7

fixed anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)