help =D
#1

pawn Код:
dcmd_buyhouse(playerid,params[])
{
    #pragma unused params
    new pName[MAX_PLAYER_NAME],string[128],file[128],string2[64];
    for(new i = 0; i < MAX_HOUSES; i++)
    {
        if(!IsPlayerInRangeOfPoint(playerid, 3, HInfo[i][HX], HInfo[i][HY], HInfo[i][HZ])) continue;
        if(HInfo[i][owned] != 0) return SendClientMessage(playerid,red,"Error: This house is owned");
        if(GetPlayerMoney(playerid) < HInfo[i][price]) return SendClientMessage(playerid,red,"Error: You dont have enough money");
        format(file,sizeof(file),"HouseSystem/Houses/%d.ini",i);
        format(string2,sizeof(string2),"%s",pName);
        GetPlayerName(playerid,pName,sizeof(pName));
        HInfo[i][owned] = 1;
        HInfo[i][ownername] = string2;
        dini_Set(file, "Ownername", pName);
        dini_IntSet(file, "Owned", 1);
        format(string,sizeof(string),"||- Info: %s has bought a house for %d -||",pName,HInfo[i][price]);
        SendClientMessageToAll(0xF50ACCFF,string);
        GivePlayerMoney(playerid, - HInfo[i][price]);
        return 1;
    }
    SendClientMessage(playerid, 0xF60000AA, "You are not close enough to a house");
    return 1;
}
pawn Код:
HInfo[i][ownername] = string2;
Quote:

C:\Users\Carlos\Desktop\New folder\filterscripts\housesystem.pwn(94) : error 006: must be assigned to an array
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.

Reply


Messages In This Thread
help =D - by MestreKiller - 16.12.2010, 21:45
Re: help =D - by [XA]PuNi$HeR_ - 17.12.2010, 00:00
Re: help =D - by blackwave - 17.12.2010, 00:02
Re: help =D - by Benjo - 17.12.2010, 00:08

Forum Jump:


Users browsing this thread: 3 Guest(s)