SA-MP Forums Archive
House help..... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: House help..... (/showthread.php?tid=82566)



House help..... - introzen - 19.06.2009

Hey everyone...

I'm trying to make a command witch locks my house.

pawn Код:
dcmd_lockhouse(playerid,params[])
    {
      #pragma unused params
     
      new pName[MAX_PLAYER_NAME],string[256],houseid[256],string3[256];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(string,sizeof(string),"EQRP/Players/%s.ini",pName);
    if(PlayerInfo[playerid][pHouse] == 0) return SendClientMessage(playerid,COLOR_DARKRED,"You don't own a house");
    format(houseid,sizeof(houseid),"House%d",PlayerInfo[playerid][pHouse]);
    format(string3,sizeof(string3),"EQRP/Houses/House%d",PlayerInfo[playerid][pHouse]);
        HouseInfo[houseid][hLocked] = 1; // LINE 6089
        dini_IntSet(string3,"Locked",1);
        return 1;
    }
I get this error:

Код:
C:\Documents and Settings\IntrozeN\Desktop\SAMP\samp server\gamemodes\CSRP.pwn(6089) : error 033: array must be indexed (variable "houseid")
Help please? =)


Re: House help..... - woot - 19.06.2009

pawn Код:
HouseInfo[PlayerInfo[playerid][pHouse]][hLocked] = 1;