Can't find a problem :/
#1

Maybe somebody knows what is my problem?

Код:
case PropertyBuyDialog:
		{
		    if(playerDB[playerid][admin] < 1)
		    {
		    	new PropertysCountV;
			    for(new i = 0; i < MAX_PROPERTYS_IN_SERVER; i ++)
			    {
			        if(strcmp(PropertySystem[i][pOwner], "0"))
			    	{
			    		if(!strcmp(PropertySystem[i][pOwner], PlayerName(playerid), false, MAX_PLAYER_NAME))
			    		{
			    		    PropertysCountV ++;
			    		}
			    	}
			    }

		    	if(PropertysCountV >= 2)
		    	{
		    	    return SendClientMessage(playerid, -1, "{ff0000}[KLAIDA]: {ffffff}Tik administratoriai gali turėti daugiau negu 2 verslus!");
	   	        }
	   	    }

	    	new pID = playerDB[playerid][SomeoneVariable][0];
	    	
	    	if(response)
	    	{
	    	    if(GetPlayerMoneyA(playerid) >= PropertySystem[pID][pPrice])
	    	    {
	    	        new String[270];
	    	        format(String, sizeof(String), ""COL_INFO"[INFO]: {ffffff}Sėkmingai nusipirkote verslą uћ "COL_PRICE"$%s{ffffff}!", konvertuoti_pinigus(PropertySystem[pID][pPrice]));
	    	        SendClientMessage(playerid, -1, String);
	    	        
	    	        GivePlayerMoneyA(playerid, -PropertySystem[pID][pPrice]);

	    	        strdel(PropertySystem[pID][pOwner], 0, MAX_PLAYER_NAME);
	    	        strcat(PropertySystem[pID][pOwner], PlayerName(playerid), MAX_PLAYER_NAME);

	    	        //format(String, sizeof(String), "{5FB404}%s\nKaina: {AEB404}%.2fLT{5FB404}\nMaksimalus pelnas: {AEB404}%.2fLT{5FB404}\nSavininkas: {FF0000}%s{5FB404}\n[Spausti ENTER]", PropertySystem[pID][pTitle], PropertySystem[pID][pPrice], PropertySystem[pID][pEarning], PropertySystem[pID][pOwner]);
					//UpdateDynamic3DTextLabelText(PropertySystem[pID][pTextLabel], -1, String);

					format(String, sizeof(String), "{FF0000}%s\n \n{ffffff}Kaina: "COL_PRICE"$%s\n{ffffff}Pelnas: "COL_PRICE"$%s/30 min\n{ffffff}Savininkas: {FF0000}%s\n{ff0000}Spausk ENTER",
					PropertySystem[pID][pTitle], konvertuoti_pinigus(PropertySystem[pID][pPrice]), konvertuoti_pinigus(PropertySystem[pID][pEarning]), PropertySystem[pID][pOwner]);
					UpdateDynamic3DTextLabelText(PropertySystem[pID][pTextLabel], -1, String);

					SaveProperty(pID);
	    	    }
	    	    else
	    	    {
	    	        SendClientMessage(playerid, -1, ""#COL_ERROR"[KLAIDA]: {ffffff}Jums neuћtenka pinigų љio verslo nusipirkimui!");
	    	    }
	    	}
		}
ERRORS:
error 012: invalid function call, not a valid address
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

LINE:
if(!strcmp(PropertySystem[i][pOwner], PlayerName(playerid), false, MAX_PLAYER_NAME))
Reply
#2

it should be this becoz you were missing bracket

use this
pawn Код:
if(!strcmp(PropertySystem[i][pOwner], PlayerName(playerid), false, MAX_PLAYER_NAME)))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)