Warnings
#1

Hello!
pawn Код:
new string[64],tmphour, tmpminute, tmpsecond, ghour, gameHour, gameMinute, gameSecond, shifthour;
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    ghour = tmphour; //warning
    gettime(gameHour, gameMinute, gameSecond);
    gameHour = FixHour(gameHour);
    SetWorldTime(tmphour);
This is my code. Its in OnGameModeInit.

This is my other code.
pawn Код:
FixHour(hour)
{
    new timeshift, shifthour;
    hour = timeshift+hour;
    if(hour < 0)
    {
        hour = hour+24;
    }
    else if(hour > 23)
    {
        hour = hour-24;
    }
    shifthour = hour; //warning
    return 1;
}
These are the warnings.
Код:
C:\Users\tuumajaam\Desktop\DreamRP Gaming + UCP [MySQL]\Server 1 [MySQL] - RP\gamemodes\mysql.pwn(50) : warning 204: symbol is assigned a value that is never used: "ghour"
C:\Users\tuumajaam\Desktop\DreamRP Gaming + UCP [MySQL]\Server 1 [MySQL] - RP\gamemodes\mysql.pwn(292) : warning 204: symbol is assigned a value that is never used: "shifthour"
Can somebody solve this?
Reply
#2

Make sure that you use ghour and shifthour example:

pawn Код:
new JamboTimer;

public OnPlayerText(playerid, text)
{
//The codes that use in JamboTimer <<< You use JamboTimer but however the pawno read it as unused so below you will see how to use it properly
    return 0;
}

//OnGamemodeInitExit
KillTimer(JamboTimer); //JamboTimer is being used here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)