Need help with simple command
#1

hi, i get these errors
Код:
C:\Users\Matt and Amy\Documents\pawno\pawno\Carsystem.pwn(230) : error 017: undefined symbol "text"
C:\Users\Matt and Amy\Documents\pawno\pawno\Carsystem.pwn(239) : error 017: undefined symbol "text"
C:\Users\Matt and Amy\Documents\pawno\pawno\Carsystem.pwn(245) : warning 209: function "zcmd_OnPlayerCommandText" should return a value
C:\Users\Matt and Amy\Documents\pawno\pawno\Carsystem.pwn(267) : error 029: invalid expression, assumed zero
this is the on player command text bit:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(pOffersMechanic[playerid])
	{
		if(strcmp(text, "Yes", true) == 0)
		{
		 PlayerInfo[playerid][pVeh1tyres1] = 0;
		 PlayerInfo[playerid][pVeh1doors1] = 0;
		 PlayerInfo[playerid][pVeh1panels1] = 0;
		 PlayerInfo[playerid][pVeh1lights1] = 0;
		 GivePlayerCash(playerid, -amount);
		 GameTextForPlayer(playerid, "Your car's body work has been fixed", 3000, 3);
		}
		else if(strcmp(text, "No", true) == 0)
		{
			GameTextForPlayer(playerid, "Canceled heal offer", 3000, 3);
		}
		return true;
	}
}
and this is the actuall command

Код:
CMD:fixcar(playerid, params[])
{
	new 		giveplayerid,
				price,
				Float:X, Float:Y, Float:Z;
	if(sscanf(params, "di", giveplayerid, price))return SendClientMessage(playerid, -1, "Type: /fixcar (playerid) (amount)");
	{
	    if(!IsPlayerConnected(giveplayerid) || giveplayerid == playerid)
	    {
	        SendClientMessage(playerid, -1, "Error: Unable to find this player.");
	        return true;
		}

		GetPlayerPos(playerid, X, Y, Z);
		if(!IsPlayerInRangeOfPoint(giveplayerid, 5.0, X, Y, Z))
		{
		    SendClientMessage(playerid, -1, "Error: This player is too far from you!");
		    return true;
		}
		new vehicleid;
		GetPlayerVehicleID(giveplayerid);
		if(vehicleid == 0))
		{
		    SendClientMessage(playerid, -1, "Error: This player is not in a vehicle!");
		    return true;
		}
  		new string[128];
		format(string, sizeof(string), "You've received an offer to fix your car for %2.1f", amount);
		SendClientMessage(giveplayerid, -1, string);
		SendClientMessage(giveplayerid, -1, "Type in the chat \"Yes\" or \"No\" to reply the offer.");
		pOffersMechanic[giveplayerid] = true;
		price = amount;
		GivePlayerCash(playerid, amount);
	}
	return true;
}
Can anyone help? Ill +rep for any useful answersss

Код:
new bool:pOffersMechanic[MAX_PLAYERS] = false;
new amount;
Reply


Messages In This Thread
Need help with simple command - by MatZZPL - 13.11.2012, 18:57
Re : Need help with simple command - by yusei - 13.11.2012, 19:05
Re: Need help with simple command - by MatZZPL - 13.11.2012, 19:09
Re: Need help with simple command - by MatZZPL - 13.11.2012, 19:52
Re : Need help with simple command - by yusei - 13.11.2012, 19:53
Re: Need help with simple command - by MatZZPL - 13.11.2012, 20:07
Re: Need help with simple command - by tyler12 - 13.11.2012, 20:11
Re: Need help with simple command - by MatZZPL - 13.11.2012, 21:38

Forum Jump:


Users browsing this thread: 3 Guest(s)