13.11.2012, 18:57
hi, i get these errors
this is the on player command text bit:
and this is the actuall command
Can anyone help? Ill +rep for any useful answersss
Код:
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
Код:
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; } }
Код:
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; }
Код:
new bool:pOffersMechanic[MAX_PLAYERS] = false; new amount;