Error ! Need 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: Error ! Need Help (
/showthread.php?tid=445393)
Error ! Need Help -
Champ - 21.06.2013
I am getting error in this ↓
pawn Код:
else if(IsPlayerConnected[playerid] == 1)
{
GameTextForPlayer(playerid, " ~w~ Sorry, No player is online in the server.", 5000, 3);
}
I am getting these errors ↓
pawn Код:
error 028: invalid subscript (not an array or too many subscripts): "IsPlayerConnected"
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
need help quick.
Thanks.
Re: Error ! Need Help -
Tuntun - 21.06.2013
No need return 1;?
Re: Error ! Need Help -
Champ - 21.06.2013
check this completely ↓
pawn Код:
public ifconnected(playerid)
{
new Float:health;
GetPlayerHealth( playerid,health );
if ( health > 0 )
{
new name[ 24 ], string[ 64 ];
GetPlayerName( playerid, name, 24 );
format( string, sizeof(string), "~w~you are winner.", name );
GameTextForAll( string, 5000, 3 );
}
else if(IsPlayerConnected[playerid] == 1)
{
GameTextForPlayer(playerid, "~w~ Sorry no one is online in the server.", 5000, 3);
}
return 1;
}
Re: Error ! Need Help -
Necip - 21.06.2013
Try this:
pawn Код:
public ifconnected(playerid)
{
new Float:health;
GetPlayerHealth( playerid,health );
if ( health > 0 )
{
new name[ 24 ], string[ 64 ];
GetPlayerName( playerid, name, 24 );
format( string, sizeof(string), "~w~you are winner.", name );
GameTextForAll( string, 5000, 3 );
}
else if(IsPlayerConnected(playerid))
{
GameTextForPlayer(playerid, "~w~ Sorry no one is online in the server.", 5000, 3);
}
return 1;
}