[HELP] Facing some errors
#1

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;
	    }
     }
   }
Reply
#2

The message is clear, the MessageToZ has to return a value. So just add return 1; after the loop as well.
Reply
#3

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?
Reply
#4

This is the loop.

PHP код:
 for(new 0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i) == 1)
            if(
PlayerInfo[i][Z] >= 1) {
            if(
PlayerInfo[i][LoggedIn] == 1) {
            
SendClientMessage(icolorstring); }
            return 
1;
        } 
Reply
#5

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 ].
Reply
#6

Account Resolved, thanks for help jlalt
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)