#1

Код:
C:\Documents and Settings\s\Desktop\1\scriptfiles\fps.pwn(24) : error 001: expected token: ";", but found "public"
C:\Documents and Settings\s\Desktop\1\scriptfiles\fps.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\s\Desktop\1\scriptfiles\fps.pwn(30) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\s\Desktop\1\scriptfiles\fps.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\s\Desktop\1\scriptfiles\fps.pwn(30) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
This is Line (24)
Код:
public OnFilterScriptInit()
this is line (30)
Код:
Textdraw0 = TextDrawCreate(592.000000, 1.000000, "~r~FPS:~w~ %i"),pFPS);
Reply
#2

You made ​​a small mistake, put %i"), pFPS);

Код:
Textdraw0 = TextDrawCreate(592.000000, 1.000000, "~r~FPS:~w~ %i"), pFPS);
Correct is % i", PFPS);

Код:
Textdraw0 = TextDrawCreate(592.000000, 1.000000, "~r~FPS:~w~ %i", pFPS);
Reply
#3

thank you now have 1error/warning
Код:
C:\Documents and Settings\s\Desktop\1\scriptfiles\fps.pwn(24) : error 001: expected token: ";", but found "public"
C:\Documents and Settings\s\Desktop\1\scriptfiles\fps.pwn(30) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Line 24
Код:
public OnFilterScriptInit()
line 30
Код:
Textdraw0 = TextDrawCreate(592.000000, 1.000000, "~r~FPS:~w~ %i", pFPS);
Reply
#4

Help plz
Reply
#5

I think a line above of the line (24) is missing the character ";"
Reply
#6

then give me code
Reply
#7

You are doing it wrong. Here this is how you do it.
pawn Код:
new Text:Textdraw0;
 
public OnGameModeInit()
{
    Textdraw0 = TextDrawCreate(592.000000, 1.000000, "~r~FPS:~w~");
    return 1;
}
 
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
}

public OnPlayerUpdate(playerid)
{
    new string[128];
    format(string, sizeof(string), "~r~FPS:~w~ %i", GetPlayerFPS(playerid));
    TextDrawSetString(Textdraw0, string);  
    TextDrawShowForPlayer(playerid, Textdraw0);
    return 1;
}
Reply
#8

You can try this
pawn Код:
new Text:Textdraw0;
 
stock UpdateTextdraw0(playerid)
{
    new string[128];
    format(string, sizeof(string), "~r~FPS:~w~ %i", GetPlayerFPS(playerid));
    TextDrawSetString(Textdraw0, string);
    return 1;
}
public OnGameModeInit()
{
    Textdraw0 = TextDrawCreate(592.000000, 1.000000, "~r~FPS:~w~");
    return 1;
}
 
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
}

public OnPlayerUpdate(playerid)
{
    UpdateTextdraw0(playerid)
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)