SA-MP Forums Archive
Question about this cmd. - 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: Question about this cmd. (/showthread.php?tid=436341)



Question about this cmd. - pln102 - 11.05.2013

Is there something wrong this cmd i can't figure it out
Код:
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51029) : warning 217: loose indentation
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : warning 215: expression has no effect
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : error 001: expected token: ";", but found "]"
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : fatal error 107: too many error messages on one line
Код:
CMD:helpers(playerid)
{
	new string[128];
	SendClientMessage(playerid, COLOR_YELLOW, "*** Helpers Online: ***");
		foreach(Player, i) {
				format(string, sizeof(string), "%s %s", [pNewbRank]), PlayerName(i));
				SendClientMessage(playerid, COLOR_YELLOW, string);
			}
		}
	} else {

	}
	return 1;
}
Red line is the error when i complie


Re: Question about this cmd. - [CG]Milito - 11.05.2013

pawn Код:
CMD:helpers(playerid)
{
    new string[128];
    SendClientMessage(playerid, COLOR_YELLOW, "*** Helpers Online: ***");
        foreach(Player, i)
            {
                format(string, sizeof(string), "%s %s", [pNewbRank], PlayerName(i));
                SendClientMessage(playerid, COLOR_YELLOW, string);
            }
        }
    } else {

    }
    return 1;
}
Oo'
You have 3 { and 5 }


Re: Question about this cmd. - pln102 - 11.05.2013

I did replaced the code but still getting errors
Код:
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51029) : warning 217: loose indentation
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : warning 215: expression has no effect
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : error 001: expected token: ";", but found "]"
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn51031) : fatal error 107: too many error messages on one line



Re: Question about this cmd. - VishvaJeet - 11.05.2013

Код:
CMD:helpers(playerid,params[])
{
    new string[128];
    SendClientMessage(playerid, COLOR_YELLOW, "*** Helpers Online: ***");
        foreach(Player, i) 
            {
                format(string, sizeof(string), "%s %s", [pNewbRank], PlayerName(i));
                SendClientMessage(playerid, COLOR_YELLOW, string);
            }
        }
    }
 else SendClientMessage(playerid,COLOR_YELLOW,"lol");

    }
    return 1;
}