17.03.2010, 06:20
well im new with the ZMCD and i dont know why it dosent work so can someone explain me it how do i have to correct this or what to do thanks in advance
and my error will be (9931) : error 017: undefined symbol "cmdtext"
and the line is
Код:
CMD:buyhouse(playerid, params[]) { if(PlayerInfo[playerid][pOwnsHouse] != 1) { new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, WHITE, "Stand In Front Of Your House Door And type in /buyhouse entrance."); SendClientMessage(playerid, WHITE, "Chose a Realistic place to place your house entrance (door)"); SendClientMessage(playerid, RED, "Admins Wll Be Notified And Will check If your house is placed in a Realistic place"); SendClientMessage(playerid, RED, "If is not in a Realistic place they will Destroy Your house without Any Refunds."); return 1; } if(strcmp(x_nr,"entrance",true) == 0) { if(PlayerInfo[playerid][pGotEntrance] != 0) return SendClientMessage(playerid,RED,"You've already placed your house entrance."); else if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,WHITE,"You have to be outside to make a entrance."), SendClientMessage(playerid,WHITE,"If this is a error in the script, please Contact a Admin/Scripter."); else if(GetPlayerMoney(playerid) <= 49999) return SendClientMessage(playerid,WHITE,"You need atleast $50,000 to buy a house."); else { SendClientMessage(playerid, WHITE, "Your house entrance has been placed. If you placed it wrong, stand in the"); SendClientMessage(playerid, WHITE, "appropriate place and type /buyhouse entrance again. Otherwise, type" ); SendClientMessage(playerid, WHITE, "/buyhouse car to place your house car."); new Float:pX,Float:pY,Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); PlayerInfo[playerid][pHouseX] = Float:pX; // The co-ords for House enter PlayerInfo[playerid][pHouseY] = Float:pY; // The co-ords for House enter PlayerInfo[playerid][pHouseZ] = Float:pZ; // The co-ords for House enter PlayerInfo[playerid][pEnterHouse] = 0; PlayerInfo[playerid][pMakingHouse] = 1; } return 1; }
and the line is
Код:
x_nr = strtok(cmdtext, idx);