02.07.2013, 19:43
Okay guys
I did abst. nothing to sscanf2, I don't why it gave these errors, anyone?
pawn Код:
new StShowing[MAX_PLAYERS];
new PlayerText:StTextdraw0;
new PlayerText:StTextdraw1;
new PlayerText:StTextdraw2;
new PlayerText:StTextdraw3;
new PlayerText:StTextdraw4;
new PlayerText:StTextdraw5;
new PlayerText:StTextdraw6;
//========================================//
under OnPlayerConnect
//Stats Texts
StShowing[playerid] =0;
StTextdraw0 = CreatePlayerTextDraw(playerid,500.000000, 296.000000, "__");
PlayerTextDrawBackgroundColor(playerid,StTextdraw0, 255);
PlayerTextDrawFont(Stplayerid,Textdraw0, 1);
PlayerTextDrawLetterSize(playerid,StTextdraw0, 0.500000, 1.000000);
PlayerTextDrawColor(playerid,StTextdraw0, -1);
PlayerTextDrawSetOutline(playerid,StTextdraw0, 0);
PlayerTextDrawSetProportional(playerid,StTextdraw0, 1);
PlayerTextDrawSetShadow(playerid,StTextdraw0, 1);
PlayerTextDrawUseBox(playerid,StTextdraw0, 1);
PlayerTextDrawBoxColor(playerid,StTextdraw0, 102);
PlayerTextDrawTextSize(playerid,StTextdraw0, 629.000000, 68.000000);
PlayerTextDrawSetSelectable(playerid,StTextdraw0, 0);
StTextdraw1 = CreatePlayerTextDraw(playerid,500.000000, 309.000000, "Rank:");
PlayerTextDrawBackgroundColor(playerid,StTextdraw1, 255);
PlayerTextDrawFont(playerid,StTextdraw1, 1);
PlayerTextDrawLetterSize(playerid,StTextdraw1, 0.500000, 1.000000);
PlayerTextDrawColor(playerid,StTextdraw1, -1);
PlayerTextDrawSetOutline(playerid,StTextdraw1, 0);
PlayerTextDrawSetProportional(playerid,StTextdraw1, 1);
PlayerTextDrawSetShadow(playerid,StTextdraw1, 1);
PlayerTextDrawUseBox(playerid,StTextdraw1, 1);
PlayerTextDrawBoxColor(playerid,StTextdraw1, 102);
PlayerTextDrawTextSize(playerid,StTextdraw1, 629.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid,StTextdraw1, 0);
StTextdraw2 = CreatePlayerTextDraw(playerid,500.000000, 323.000000, "Score:");
PlayerTextDrawBackgroundColor(playerid,StTextdraw2, 255);
PlayerTextDrawFont(playerid,StTextdraw2, 1);
PlayerTextDrawLetterSize(playerid,StTextdraw2, 0.500000, 1.000000);
PlayerTextDrawColor(playerid,StTextdraw2, -1);
PlayerTextDrawSetOutline(playerid,StTextdraw2, 0);
PlayerTextDrawSetProportional(playerid,StTextdraw2, 1);
PlayerTextDrawSetShadow(playerid,StTextdraw2, 1);
PlayerTextDrawUseBox(playerid,StTextdraw2, 1);
PlayerTextDrawBoxColor(playerid,StTextdraw2, 102);
PlayerTextDrawTextSize(playerid,StTextdraw2, 629.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid,StTextdraw2, 0);
StTextdraw3 = CreatePlayerTextDraw(playerid,500.000000, 337.000000, "Kills:");
PlayerTextDrawBackgroundColor(playerid,StTextdraw3, 255);
PlayerTextDrawFont(playerid,StTextdraw3, 1);
PlayerTextDrawLetterSize(playerid,StTextdraw3, 0.500000, 1.000000);
PlayerTextDrawColor(playerid,StTextdraw3, -1);
PlayerTextDrawSetOutline(playerid,StTextdraw3, 0);
PlayerTextDrawSetProportional(playerid,StTextdraw3, 1);
PlayerTextDrawSetShadow(playerid,StTextdraw3, 1);
PlayerTextDrawUseBox(playerid,StTextdraw3, 1);
PlayerTextDrawBoxColor(playerid,StTextdraw3, 102);
PlayerTextDrawTextSize(playerid,StTextdraw3, 629.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid,StTextdraw3, 0);
StTextdraw4 = CreatePlayerTextDraw(playerid,500.000000, 351.000000, "Deaths:");
PlayerTextDrawBackgroundColor(playerid,StTextdraw4, 255);
PlayerTextDrawFont(playerid,StTextdraw4, 1);
PlayerTextDrawLetterSize(playerid,StTextdraw4, 0.500000, 1.000000);
PlayerTextDrawColor(playerid,StTextdraw4, -1);
PlayerTextDrawSetOutline(playerid,StTextdraw4, 0);
PlayerTextDrawSetProportional(playerid,StTextdraw4, 1);
PlayerTextDrawSetShadow(playerid,StTextdraw4, 1);
PlayerTextDrawUseBox(playerid,StTextdraw4, 1);
PlayerTextDrawBoxColor(playerid,StTextdraw4, 102);
PlayerTextDrawTextSize(playerid,StTextdraw4, 629.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid,StTextdraw4, 0);
StTextdraw5 = CreatePlayerTextDraw(playerid,500.000000, 365.000000, "Nuclear 1:");
PlayerTextDrawBackgroundColor(playerid,StTextdraw5, 255);
PlayerTextDrawFont(playerid,StTextdraw5, 1);
PlayerTextDrawLetterSize(playerid,StTextdraw5, 0.500000, 1.000000);
PlayerTextDrawColor(playerid,StTextdraw5, -1);
PlayerTextDrawSetOutline(playerid,StTextdraw5, 0);
PlayerTextDrawSetProportional(playerid,StTextdraw5, 1);
PlayerTextDrawSetShadow(playerid,StTextdraw5, 1);
PlayerTextDrawUseBox(playerid,StTextdraw5, 1);
PlayerTextDrawBoxColor(playerid,StTextdraw5, 102);
PlayerTextDrawTextSize(playerid,StTextdraw5, 629.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid,StTextdraw5, 0);
StTextdraw6 = CreatePlayerTextDraw(playerid,500.000000, 379.000000, "Vehicle:");
PlayerTextDrawBackgroundColor(playerid,StTextdraw6, 255);
PlayerTextDrawFont(playerid,StTextdraw6, 1);
PlayerTextDrawLetterSize(playerid,StTextdraw6, 0.500000, 1.000000);
PlayerTextDrawColor(playerid,StTextdraw6, -1);
PlayerTextDrawSetOutline(playerid,StTextdraw6, 0);
PlayerTextDrawSetProportional(playerid,StTextdraw6, 1);
PlayerTextDrawSetShadow(playerid,StTextdraw6, 1);
PlayerTextDrawUseBox(playerid,StTextdraw6, 1);
PlayerTextDrawBoxColor(playerid,StTextdraw6, 102);
PlayerTextDrawTextSize(playerid,StTextdraw6, 629.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid,StTextdraw6, 0);
//====================================================================//
under OnPlayerUpdate
new string[128];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
format(string,40,"%s", pname);
PlayerTextDrawSetString(playerid,StTextdraw0[playerid],string); //error line 1994
format(string,40,"Score: %d",PlayerInfo[playerid][pScore]);
PlayerTextDrawSetString(playerid,StTextdraw2[playerid],string);
format(string,40,"Kills: %d",PlayerInfo[playerid][pKills]);
PlayerTextDrawSetString(playerid,StTextdraw3[playerid],string);
format(string,40,"Deaths: %d",PlayerInfo[playerid][pDeaths]);
PlayerTextDrawSetString(playerid,StTextdraw4[playerid],string);
format(string,40,"Vehicle:");
PlayerTextDrawSetString(playerid,StTextdraw6[playerid],string);
//============================================================//
under OnPlayerSpawn
if(StShowing[playerid] == 1)
{
StShowing[playerid] = 0;
PlayerTextDrawShow(playerid, StTextdraw0);
PlayerTextDrawShow(playerid, StTextdraw1);
PlayerTextDrawShow(playerid, StTextdraw2);
PlayerTextDrawShow(playerid, StTextdraw3);
PlayerTextDrawShow(playerid, StTextdraw4);
PlayerTextDrawShow(playerid, StTextdraw5);
PlayerTextDrawShow(playerid, StTextdraw6);
}
else
{
StShowing[playerid] = 1;
PlayerTextDrawHide(playerid, StTextdraw0);
PlayerTextDrawHide(playerid, StTextdraw1);
PlayerTextDrawHide(playerid, StTextdraw2);
PlayerTextDrawHide(playerid, StTextdraw3);
PlayerTextDrawHide(playerid, StTextdraw4);
PlayerTextDrawHide(playerid, StTextdraw5);
PlayerTextDrawHide(playerid, StTextdraw6);
}
//========================================================//
OnPlayerDis
StShowing =0;
PlayerTextDrawDestroy(playerid, StTextdraw0);
PlayerTextDrawDestroy(playerid, StTextdraw1);
PlayerTextDrawDestroy(playerid, StTextdraw2);
PlayerTextDrawDestroy(playerid, StTextdraw3);
PlayerTextDrawDestroy(playerid, StTextdraw4);
PlayerTextDrawDestroy(playerid, StTextdraw5);
PlayerTextDrawDestroy(playerid, StTextdraw6);
Код:
E:\The Real Deathmatch\The Real Deathmatch v0.2\pawno\include\sscanf2.inc(227) : error 017: undefined symbol "SSCANF_OnPlayerDisconnect" E:\The Real Deathmatch\The Real Deathmatch v0.2\gamemodes\TRDv0.2.pwn(1994) : error 028: invalid subscript (not an array or too many subscripts): "StTextdraw0" E:\The Real Deathmatch\The Real Deathmatch v0.2\gamemodes\TRDv0.2.pwn(1994) : warning 215: expression has no effect E:\The Real Deathmatch\The Real Deathmatch v0.2\gamemodes\TRDv0.2.pwn(1994) : error 001: expected token: ";", but found "]" E:\The Real Deathmatch\The Real Deathmatch v0.2\gamemodes\TRDv0.2.pwn(1994) : error 029: invalid expression, assumed zero E:\The Real Deathmatch\The Real Deathmatch v0.2\gamemodes\TRDv0.2.pwn(1994) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.