19.04.2011, 14:04
HI all im stucked with this script. Its acutelly a scoreboard showing the rank and score of the player
im getting this errors
can anyone help me? pls i need to fix it soon as possible
thanks
xRx
pawn Код:
#include <a_samp>
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new rank[ MAX_PLAYERS ];
public OnFilterScriptInit()
{
Textdraw0 = TextDrawCreate(414.000000, 404.000000, "Score:~r~");
TextDrawBackgroundColor(Textdraw0, 16711935);
TextDrawFont(Textdraw0, 2);
TextDrawLetterSize(Textdraw0, 0.529999, 2.599999);
TextDrawColor(Textdraw0, 65535);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw2 = TextDrawCreate(414.000000, 384.000000, "Rank:~r~");
TextDrawBackgroundColor(Textdraw2, 16711935);
TextDrawFont(Textdraw2, 2);
TextDrawLetterSize(Textdraw2, 0.570000, 2.700000);
TextDrawColor(Textdraw2, 65535);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
return 1;
}
public OnPlayerSpawn( playerid )
{
TextDrawShowForPlayer( playerid, Textdraw0 );
TextDrawShowForPlayer( playerid, Textdraw1 );
TextDrawShowForPlayer( playerid, Textdraw2 );
return 1;
}
public OnPlayerUpdate( playerid )
{
new string[ 128 ];
new score;
score = GetPlayerScore(playerid);
format( string, sizeof string, "Score:~r~ %d", score );
TextDrawSetString(Textdraw0, string);
if(GetPlayerScore(playerid) >= 1000) rank[ playerid ] = (500, 100, "General");
else if(GetPlayerScore(playerid) >= 700) rank[ playerid ] = (500, 100, "Captain");
else if(GetPlayerScore(playerid) >= 500) rank[ playerid ] = (500, 100, "Lieutenant");
else if(GetPlayerScore(playerid) >= 200) rank[ playerid ] = (500, 100, "Sergeant");
else if(GetPlayerScore(playerid) >= 100) rank[ playerid ] = (500, 100, "Corporal");
else if(GetPlayerScore(playerid) >= 50) rank[ playerid ] = (500, 100, "Privat First Class");
else if(GetPlayerScore(playerid) >= 0) rank[ playerid ] = (500, 100, "Privat");
format( string, sizeof string, "Rank:~r~ %d", rank[ playerid ] );
TextDrawSetString( Textdraw2, string );
return 1;
}
pawn Код:
C:\Users\Admin\Desktop\COD9 - Battlefield\filterscripts\ranking.pwn(44) : error 006: must be assigned to an array
C:\Users\Admin\Desktop\COD9 - Battlefield\filterscripts\ranking.pwn(45) : error 006: must be assigned to an array
C:\Users\Admin\Desktop\COD9 - Battlefield\filterscripts\ranking.pwn(46) : error 006: must be assigned to an array
C:\Users\Admin\Desktop\COD9 - Battlefield\filterscripts\ranking.pwn(47) : error 006: must be assigned to an array
C:\Users\Admin\Desktop\COD9 - Battlefield\filterscripts\ranking.pwn(48) : error 006: must be assigned to an array
C:\Users\Admin\Desktop\COD9 - Battlefield\filterscripts\ranking.pwn(49) : error 006: must be assigned to an array
C:\Users\Admin\Desktop\COD9 - Battlefield\filterscripts\ranking.pwn(50) : error 006: must be assigned to an array
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.
thanks
xRx