10.10.2010, 17:55
(
Последний раз редактировалось Tommie1331; 10.10.2010 в 18:14.
)
pawn Код:
cmd_house(playerid,params[]) {
#pragma unused params
if(IsPlayerConnected(playerid)){
new tmp[64];
the line thats fucked-if(sscanf(params, "s", tmp)) return SendClientMessage(playerid, COLOR_GREY, ".: Usage: /house (upgrade/downgrade) :.");
SendFormattedMessage(playerid, COLOR_WHITE, "Prices for upgrade: 0[%d], 1[%d], 2[%d], 3[%d], 4[%d], 5[%d], 6[%d]", HousesLevels[0][1], HousesLevels[1][1], HousesLevels[2][1], HousesLevels[3][1], HousesLevels[4][1], HousesLevels[5][1], HousesLevels[6][1]);
SendFormattedMessage(playerid, COLOR_WHITE, "7[%d], 8[%d], 9[%d], 10[%d], 11[%d], 12[%d]", HousesLevels[7][1], HousesLevels[8][1], HousesLevels[9][1], HousesLevels[10][1], HousesLevels[11][1], HousesLevels[12][1]);
if(strlen(tmp) == strlen("upgrade")){
for(new h = 0; h <= MAX_HOUSES; h++){
if(PlayerToPoint(PTP_RADIUS, playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ])){
if(strcmp(HouseInfo[h][hName],GetName(playerid), false ) == 0){
if(HouseInfo[h][hLevel]+1 > 12) return SendClientMessage(playerid, COLOR_ERROR, "You cannot set your house lvl above 12");
new Level = HousesLevels[HouseInfo[h][hLevel]+1][1];
SendFormattedMessage(playerid, COLOR_WHITE, "You have added improvments to your house that costs $%d", Level);
HouseInfo[h][hLevel] = (HouseInfo[h][hLevel]+1); GivePlayerMoney(playerid, -Level); Money[playerid] -= Level;
SavePlayerHouse(h);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
C:\Users\Lyn\Documents\Mafia\gamemodes\MafiaCity2. pwn(30310) : error 033: array must be indexed (variable "tmp")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
wtf does that mean ive never ever ever seen that before in my life