SA-MP Forums Archive
Warning help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Warning help (/showthread.php?tid=448656)



Warning help - Shazwan - 05.07.2013

Quote:

G:\Xtreme Roleplay v2.4\pawno\XRP.pwn(3691) : warning 202: number of arguments does not match definition
G:\Xtreme Roleplay v2.4\pawno\XRP.pwn(7405 : warning 217: loose indentation
G:\Xtreme Roleplay v2.4\pawno\XRP.pwn(85213) : warning 203: symbol is never used: "FALSE"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.

What do i do?


Re: Warning help - Xoomer - 05.07.2013

post here ur code

that


Re: Warning help - Shazwan - 05.07.2013

Quote:

stock StopRefueling(playerid)
{
GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
THIS LINE>> SendClientMessageEx(playerid, COLOR_WHITE,"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);

new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
{
mypoint = i;
}
}
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
}
}

RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
return true;
}

for warning no 1


Re: Warning help - Xoomer - 05.07.2013

pawn Код:
stock StopRefueling(playerid)
{
new string [256];
GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
format(strng,sizeof(string),"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);
SendClientMessageEx(playerid, COLOR_WHITE,string);

new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
{
mypoint = i;
}
}
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
}
}

RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
return true;
}
}
try this


Re: Warning help - Shazwan - 05.07.2013

it give this

G:\X Roleplay v2.4\pawno\XRP.pwn(3692) : error 017: undefined symbol "strng"
G:\X Roleplay v2.4\pawno\XRP.pwn(3692) : error 035: argument type mismatch (argument 1)
G:\X Roleplay v2.4\pawno\XRP.pwn(3714) : error 054: unmatched closing brace ("}")


Re: Warning help - Necip - 05.07.2013

Here:
pawn Код:
stock StopRefueling(playerid)
{
new string [256];
GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
format(string,sizeof(string),"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);
SendClientMessageEx(playerid, COLOR_WHITE,string);

new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
{
mypoint = i;
}
}
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
}
}

RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
return true;
}
}



- Shazwan - 05.07.2013

sorry about the above bi space.

This is the right one

stock StopRefueling(playerid)
{
GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
SendClientMessageEx(playerid, COLOR_WHITE,"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);

new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
{
mypoint = i;
}
}
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
}
}

RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
return true;
}


Re: Warning help - ToiletDuck - 05.07.2013

This should be fixed
pawn Код:
stock StopRefueling(playerid)
{
    new string [256];
    GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
    format(string,sizeof(string),"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]); // Fixed string word
    SendClientMessageEx(playerid, COLOR_WHITE,string);

    new mypoint = -1;
    for (new i=0; i<MAX_POINTS; i++)
    {
        if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
        {
            mypoint = i;
        }
    }
    for(new i = 0; i < sizeof(FamilyInfo); i++)
    {
        if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
        {
            FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
        }
    }

    RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
    return true;
}



Re: Warning help - Necip - 05.07.2013

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
This should be fixed
pawn Код:
stock StopRefueling(playerid)
{
    new string [256];
    GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
    format(strng,sizeof(string),"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);
    SendClientMessageEx(playerid, COLOR_WHITE,string);

    new mypoint = -1;
    for (new i=0; i<MAX_POINTS; i++)
    {
        if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
        {
            mypoint = i;
        }
    }
    for(new i = 0; i < sizeof(FamilyInfo); i++)
    {
        if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
        {
            FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
        }
    }

    RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
    return true;
}
This won't fix it, the same error.Look what the error says: "undefined symbol "strng"", Which means that there is something wrong with strng.


Re: Warning help - ToiletDuck - 05.07.2013

Quote:
Originally Posted by Necip
Посмотреть сообщение
This won't fix it, the same error.Look what the error says: "undefined symbol "strng"", Which means that there is something wrong with strng.
Fixed
pawn Код:
format(string,sizeof(string),"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);