Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (
/showthread.php?tid=507728)
Help -
VanSiera - 18.04.2014
Код:
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);
Re: Help -
HotStyle - 18.04.2014
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);
Re: Help -
VanSiera - 18.04.2014
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);
Re: Help -
VanSiera - 19.04.2014
Help plz
Re: Help -
HotStyle - 19.04.2014
I think a line above of the line (24) is missing the character "
;"
Re: Help -
VanSiera - 19.04.2014
then give me code
Re: Help -
awsomedude - 19.04.2014
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;
}
Re: Help -
ChandraLouis - 19.04.2014
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;
}