SA-MP Forums Archive
Command error and warning [REP+] - 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: Command error and warning [REP+] (/showthread.php?tid=575788)



Command error and warning [REP+] - LMaxCo - 30.05.2015

Anyone can help me with this error?

Код:
error 017: undefined symbol "FPS"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
The error and warning line :
Код:
CMD:fps( playerid, params[ ] )
{
	gsString[ 0 ] = EOS;
	format( gsString, sizeof( gsString ), "%s\n{375FFF}%s{00FF19}[FPS:%d]"YE"[Ping:%d]", gsString, PlayerName(playerid), FPS[ playerid ], GetPlayerPing( playerid ) );
	ShowPlayerDialog( playerid, DIALOG_EMPTY, DIALOG_STYLE_MSGBOX, ""NAME_S" "W"- Video FPS", gsString, "(Exit)", "" );
	return ( 1 );
}
Thanks, and please help me


Re: Command error and warning [REP+] - GTLS - 30.05.2015

What is your previous Command? i think you have forgotten to put return 1 or return 0 in it!
OR
you have put return value at wrong position.... if possible post your previous command here!


Re: Command error and warning [REP+] - LMaxCo - 30.05.2015

Quote:
Originally Posted by GTLS
Посмотреть сообщение
What is your previous Command? i think you have forgotten to put return 1 or return 0 in it!
OR
you have put return value at wrong position.... if possible post your previous command here!
here you go
Код:
CMD:jetpack( playerid, params[ ] )
{
    VipCheck( playerid, 3 );
	SetPlayerSpecialAction( playerid, 2 );
    return ( 1 );
}



Re: Command error and warning [REP+] - GTLS - 30.05.2015

Quote:
Originally Posted by LMaxCo
Посмотреть сообщение
here you go
Код:
CMD:jetpack( playerid, params[ ] )
{
    VipCheck( playerid, 3 );
	SetPlayerSpecialAction( playerid, 2 );
    return ( 1 );
}
try,
Код:
CMD:jetpack(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3 && PlayerInfo[playerid][pAdmin] < 4) {
        JetPack[playerid] = 1;
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
        return 1;
    }
and, at start of your script
Код:
new JetPack[MAX_PLAYERS];
and compile it and see if it works! make modifications as your like i have given cmd jetpack for admins you can use CheckVIP or what ever you'r using! your this Jetpack cmd is the problem only so try this one which i have given you and then try!

EDIT: have you made a variable at top of your script ?
Код:
new FPS[MAX_PLAYERS];
rep+ if worked!


Re: Command error and warning [REP+] - LMaxCo - 30.05.2015

Quote:
Originally Posted by GTLS
Посмотреть сообщение
try,
Код:
CMD:jetpack(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3 && PlayerInfo[playerid][pAdmin] < 4) {
        JetPack[playerid] = 1;
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
        return 1;
    }
and, at start of your script
Код:
new JetPack[MAX_PLAYERS];
and compile it and see if it works! make modifications as your like i have given cmd jetpack for admins you can use CheckVIP or what ever you'r using! your this Jetpack cmd is the problem only so try this one which i have given you and then try!

EDIT: have you made a variable at top of your script ?
Код:
new FPS[MAX_PLAYERS];
rep+ if worked!

The problem is in FPS command dude -,-, not in Jetpack command,
And
Код:
error 017: undefined symbol "FPS"
problem already fixed by me.


Re: Command error and warning [REP+] - GTLS - 30.05.2015

Quote:
Originally Posted by LMaxCo
Посмотреть сообщение

The problem is in FPS command dude -,-, not in Jetpack command,
And
Код:
error 017: undefined symbol "FPS"
problem already fixed by me.
LOL i knew your prob was in FPS cmd but i thought problem was in CMD:fps(playerid, params[]) line but have you seen my EDIT in last post? i told you to create a variable at top new FPS; to see the current value of FPS in your code!

anyways congratulations you solved your problem!