[HELP] Facing some errors - 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] Facing some errors (
/showthread.php?tid=638571)
[HELP] Facing some errors -
Shemaz - 02.08.2017
L:baba PC\Baba Script\Gamemodes\blablabla.pwn(53165) : warning 209: function "MessageToZ" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2017, ITB CompuPhase
Код:
CMDMessageToZ(playerid,command[])
{
new string[128];
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"[ZMember] '%s' (Level: %d) | Command: %s",string,PlayerInfo[playerid][Z],command);
MessageToZ(blue,string);
return 1;
}
forward MessageToZ(color,const string[]);
public MessageToZ(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[i][Z] >= 1) {
if(PlayerInfo[i][LoggedIn] == 1) {
SendClientMessage(i, color, string); }
return 1;
}
}
}
Re: [HELP] Facing some errors -
Misiur - 02.08.2017
The message is clear, the MessageToZ has to return a value. So just add return 1; after the loop as well.
Re: [HELP] Facing some errors -
Shemaz - 02.08.2017
Quote:
Originally Posted by Misiur
The message is clear, the MessageToZ has to return a value. So just add return 1; after the loop as well.
|
Which Loop?
Re: [HELP] Facing some errors -
TopShooter2 - 02.08.2017
This is the loop.
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[i][Z] >= 1) {
if(PlayerInfo[i][LoggedIn] == 1) {
SendClientMessage(i, color, string); }
return 1;
}
Re: [HELP] Facing some errors -
jlalt - 02.08.2017
this user is scammed, so I don't recommend any one to answer it lol.
[ I know user owner and he just pmed me on a social media app saying his user got scammed ].
Re: [HELP] Facing some errors -
Shemaz - 04.08.2017
Account Resolved, thanks for help jlalt