*** Terrible Title Removed
#1

I have this error when i try to compile it .

pawn Код:
D:\Downloads\Rank_and_Info\Stats.pwn(59) : error 001: expected token: ";", but found "-string-"
I want to have my own ranks like example .

If player reach 50 score he goes to " Trucker "
or when he reach 100 score he goes to " Respected Trucker "

Like this . Help please
Reply
#2

Look for the line 59 then see line 58 and there should be a missing semi colon at the end of it.
Reply
#3

pawn Код:
else if(GetPlayerScore(playerid) >= 50) rank[ playerid ] = 1; //line 58
else if(GetPlayerScore(playerid) >= 0) rank[ playerid ] = 0 "Wannable Trucker"; //line 59
nothing missing
Reply
#4

There you go:

PHP код:
else if(GetPlayerScore(playerid) >= 0rankplayerid ] = "Wannable Trucker"
Should be:

PHP код:
else if(GetPlayerScore(playerid) >= 0rankplayerid ] = 0
You were trying to store a string in an integer.
Reply
#5

Yes but how can i make my own rank ? example when he go to 0 rank , when he starts playing i mean , he is a Newbie Trucker . I need this rank . How can i add it ?
Reply
#6

Create an array for this.

Ex:
pawn Код:
new pRank[MAX_PLAYERS][24];
pawn Код:
else if(GetPlayerScore(playerid) >= 0)
{
    rank[ playerid ] = 0;
    format(pRank[playerid],24,"Wannable Trucker");
}
Reply
#7

Can someone create a filterscript for that ? I really don't know how to do it
Reply
#8

Give us whole function where you use:

Код:
else if(GetPlayerScore(playerid) >= 50) rank[ playerid ] = 1; //line 58
else if(GetPlayerScore(playerid) >= 0) rank[ playerid ] = 0 "Wannable Trucker"; //line 59
Reply
#9

Here whole code is

PHP код:
#include <a_samp>

new Text:Textdraw2;
new 
rankMAX_PLAYERS ];

public 
OnFilterScriptInit()
{
    
Textdraw2 TextDrawCreate(390.0000000.000000"Rank:~r~");
    
TextDrawBackgroundColor(Textdraw216711935);
    
TextDrawFont(Textdraw21);
    
TextDrawLetterSize(Textdraw20.5700002.700000);
    
TextDrawColor(Textdraw265535);
    
TextDrawSetOutline(Textdraw21);
    
TextDrawSetProportional(Textdraw21);
    return 
1;
}

public 
OnPlayerSpawnplayerid )
{
    
TextDrawShowForPlayerplayeridTextdraw2 );
    return 
1;
}

public 
OnPlayerUpdateplayerid )
{
    new 
string128 ];
    if(
GetPlayerScore(playerid) >= 1000rankplayerid ] = 6;
    else if(
GetPlayerScore(playerid) >= 700rankplayerid ] = 5;    
    else if(
GetPlayerScore(playerid) >= 500rankplayerid ] = 4;
    else if(
GetPlayerScore(playerid) >= 200rankplayerid ] = 3;
    else if(
GetPlayerScore(playerid) >= 100rankplayerid ] = 2;
    else if(
GetPlayerScore(playerid) >= 50rankplayerid ] = 1;
    else if(
GetPlayerScore(playerid) >= 0rankplayerid ] = 0;
    
formatstringsizeof string"Rank:~r~ %d"rankplayerid ] );
    
TextDrawSetStringTextdraw2string );
    return 
1;

Reply
#10

any solution ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)