SA-MP Forums Archive
Porgress bar not working - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Porgress bar not working (/showthread.php?tid=243394)



Porgress bar not working - sciman001 - 22.03.2011

Ok, i made this script bades on the progress bar include i found... heres the script:

pawn Код:
#include <progress>
#include <a_samp>
new bar[MAX_PLAYERS];
new killz[MAX_PLAYERS];

main()
{
    print("\n----------------------------------");
    print(" exp bar");
    print("----------------------------------\n");
}


public OnPlayerConnect(playerid)
{
    bar[playerid] = CreateProgressBar(549.00, 30.00, 57.50, 5.19, 267387050, 10000.0);
    SetProgressBarValue(bar[playerid], 0.0);
    ShowProgressBarForPlayer(playerid, bar[playerid]);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    DestroyProgressBar(bar[playerid]);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    killz[killerid] ++;
    SetProgressBarValue(bar[playerid], killz[killerid]);
    UpdateProgressBar(bar[killerid]);
    return 1;
}
and these are the warnings/errors:
pawn Код:
\\Tomscomputer\servers\world war 7\filterscripts\bar1.pwn(16) : warning 213: tag mismatch
\\Tomscomputer\servers\world war 7\filterscripts\bar1.pwn(17) : warning 213: tag mismatch
\\Tomscomputer\servers\world war 7\filterscripts\bar1.pwn(18) : warning 213: tag mismatch
\\Tomscomputer\servers\world war 7\filterscripts\bar1.pwn(24) : warning 213: tag mismatch
\\Tomscomputer\servers\world war 7\filterscripts\bar1.pwn(31) : warning 213: tag mismatch
\\Tomscomputer\servers\world war 7\filterscripts\bar1.pwn(32) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Warnings.
WHAT SHOULD I DO


Re: Porgress bar not working - Stigg - 22.03.2011

Ask in the thread the where you got the include, that's your best bet m8'y.
Your problem might have already been discussed there.


Re: Porgress bar not working - s0nic - 22.03.2011

Yea what he said..and plus they're simple warnings..nothing to worry about really if it works then it works =p.
Most of the warnings are gone except the warning in which the bar is created:
pawn Код:
#include <progress>
#include <a_samp>
new bar[MAX_PLAYERS];
new killz[MAX_PLAYERS];

main()
{
    print("\n----------------------------------");
    print(" exp bar");
    print("----------------------------------\n");
}


public OnPlayerConnect(playerid)
{
    bar[playerid] = CreateProgressBar(549.00, 30.00, 57.50, 5.19, 267387050, 10000.0);//Don't know why it gives warning
    SetProgressBarValue(Bar:bar[playerid], 0.0);
    ShowProgressBarForPlayer(playerid, Bar:bar[playerid]);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    DestroyProgressBar(Bar:bar[playerid]);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    killz[killerid] ++;
    SetProgressBarValue(Bar:bar[playerid], killz[killerid]);
    UpdateProgressBar(Bar:bar[killerid], killerid);//added killerid since i looked over the include and i guess it shows the bar to everyone if its not there?
    return 1;
}



Re: Porgress bar not working - sciman001 - 23.03.2011

fix: new Bar:bar[MAX_PLAYERS];