Crash on start.
#1

This thing crashes the Server so it wont start, help? i need it
pawn Код:
public StatsUpdate()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if (IsPlayerConnected(i))
      {
      new string2[128]
new string3[128]
new string4[128]
new string5[128]
format(string5,sizeof(string5),"Level %d",PlayerInfo[i][Level]);
format(string2,sizeof(string2),"Respect %d",PlayerInfo[i][Exp]);
format(string3,sizeof(string3),"PhoneNumber: %d",PlayerInfo[i][number]);
format(string4,sizeof(string4),"Balance: %d",PlayerInfo[i][Account]);
TextDrawSetString(TextBank[i],string4);
TextDrawSetString(TextNumber[i],string3);
TextDrawSetString(TextRespect[i],string2);
TextDrawSetString(TextLvl[i],string5);
    TextDrawShowForPlayer(i,Textdraw0);
        TextDrawShowForPlayer(i,TextLvl[i]);
            TextDrawShowForPlayer(i,TextRespect[i]);
                TextDrawShowForPlayer(i,TextNumber[i]);
                    TextDrawShowForPlayer(i,TextBank[i]);

    }
 }
    return 1;
}
And the Panel dont work it only says Level 0 Balance 0 etc
Reply
#2

how do you know it's this that keeps the server from running?
Reply
#3

I know because i remove it, the server works fine, i add it it dosent work and i need it for my stats panel...
Reply
#4

Debug your code and you'll know where the problem appears.
Reply
#5

Okay, il try never tried this befor
Reply
#6

maybe easier if you show the errors when you compile the script...
Reply
#7

Quote:
Originally Posted by ExoSanty
maybe easier if you show the errors when you compile the script...
Pay attention. There are no errors.
Reply
#8

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by ExoSanty
maybe easier if you show the errors when you compile the script...
Pay attention. There are no errors.
where exactly is that stated?
Reply
#9

Quote:
Originally Posted by ExoSanty
where exactly is that stated?
Quote:
Originally Posted by Cake.
This thing crashes the Server so it wont start, help? i need it
Isn't it obvious?
Reply
#10

if there was any error i wuld say?

so

il give you the whole code, i cant find the bug, i am blind i think i did check it twice but still i cant find it


pawn Код:
new Text:TextLvl[200];
new Text:TextRespect[200];
new Text:TextNumber[200];
new Text:TextBank[200]
On gamemode
pawn Код:
new string2[128]
new string3[128]
new string4[128]
new string5[128]
new playerid
Textdraw0 = TextDrawCreate(1.000000,436.000000,"Stats");
TextLvl[playerid] = TextDrawCreate(46.000000,436.000000,string5);
TextRespect[playerid] = TextDrawCreate(91.000000,435.000000,string2);
TextNumber[playerid] = TextDrawCreate(148.000000,435.000000,string3);
TextBank[playerid] = TextDrawCreate(254.000000,436.000000,string4);
TextDrawUseBox(Textdraw0,1);
TextDrawBoxColor(Textdraw0,0x000000ff);
TextDrawTextSize(Textdraw0,458.000000,1142.000000);
TextDrawAlignment(Textdraw0,0);
TextDrawAlignment(TextLvl[playerid],0);
TextDrawAlignment(TextRespect[playerid],0);
TextDrawAlignment(TextNumber[playerid],0);
TextDrawAlignment(TextBank[playerid],0);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawBackgroundColor(TextLvl[playerid],0x000000ff);
TextDrawBackgroundColor(TextRespect[playerid],0x000000ff);
TextDrawBackgroundColor(TextNumber[playerid],0x000000ff);
TextDrawBackgroundColor(TextBank[playerid],0x000000ff);
TextDrawFont(Textdraw0,1);
TextDrawLetterSize(Textdraw0,0.299999,1.000000);
TextDrawFont(TextLvl[playerid],1);
TextDrawLetterSize(TextLvl[playerid],0.299999,1.100000);
TextDrawFont(TextRespect[playerid],1);
TextDrawLetterSize(TextRespect[playerid],0.299999,1.200000);
TextDrawFont(TextNumber[playerid],1);
TextDrawLetterSize(TextNumber[playerid],0.299999,1.200000);
TextDrawFont(TextBank[playerid],1);
TextDrawLetterSize(TextBank[playerid],0.299999,1.100000);
TextDrawColor(Textdraw0,0xffffffff);
TextDrawColor(TextLvl[playerid],0xffffffff);
TextDrawColor(TextRespect[playerid],0xffffffff);
TextDrawColor(TextNumber[playerid],0xffffffff);
TextDrawColor(TextBank[playerid],0xffffffff);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetOutline(TextLvl[playerid],1);
TextDrawSetOutline(TextRespect[playerid],1);
TextDrawSetOutline(TextNumber[playerid],1);
TextDrawSetOutline(TextBank[playerid],1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetProportional(TextLvl[playerid],1);
TextDrawSetProportional(TextRespect[playerid],1);
TextDrawSetProportional(TextNumber[playerid],1);
TextDrawSetProportional(TextBank[playerid],1);
TextDrawSetShadow(Textdraw0,10);
TextDrawSetShadow(TextLvl[playerid],1);
TextDrawSetShadow(TextRespect[playerid],1);
TextDrawSetShadow(TextNumber[playerid],1);
TextDrawSetShadow(TextBank[playerid],1);
pawn Код:
public StatsUpdate()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if (IsPlayerConnected(i))
      {
      new string2[128]
new string3[128]
new string4[128]
new string5[128]
format(string5,sizeof(string5),"Level %d",PlayerInfo[i][Level]);
format(string2,sizeof(string2),"Respect %d",PlayerInfo[i][Exp]);
format(string3,sizeof(string3),"PhoneNumber: %d",PlayerInfo[i][number]);
format(string4,sizeof(string4),"Balance: %d",PlayerInfo[i][Account]);
TextDrawSetString(TextBank[i],string4);
TextDrawSetString(TextNumber[i],string3);
TextDrawSetString(TextRespect[i],string2);
TextDrawSetString(TextLvl[i],string5);
    TextDrawShowForPlayer(i,Textdraw0);
        TextDrawShowForPlayer(i,TextLvl[i]);
            TextDrawShowForPlayer(i,TextRespect[i]);
                TextDrawShowForPlayer(i,TextNumber[i]);
                    TextDrawShowForPlayer(i,TextBank[i]);

    }
 }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)