size array? but it is
#1

i dunno, i cant see the problem
pawn Код:
dcmd_createhouse(playerid,params[])
{
    Housecount ++;
    new ID = Housecount,Float: X, Float: Y, Float: Z,cost,housename[128];
    if(!IsPlayerAdmin(playerid)) return 0;
    if(sscanf(params,"d",cost)) return SCM(playerid,0xECF807FF,"USAGE: /createhouse [price]");
    format(housename,sizeof(housename),"No_Owner");
    GetPlayerPos(playerid,X,Y,Z);
    HInfo[ID][HX] = X;
    HInfo[ID][HY] = Y;
    HInfo[ID][HZ] = Z;
    HInfo[ID][owned] = 0;
    HInfo[ID][ownername] = housename;
    HInfo[ID][price] = cost;
    return 1;
}
error line
pawn Код:
HInfo[ID][ownername] = housename;
Код:
C:\Users\User\Desktop\Untitled.pwn(104) : error 006: must be assigned to an array
Reply
#2

If you want to make a text variable equal to another you could use strmid:


pawn Код:
strmid(HInfo[ID][ownername], housename, 0, strlen(housename), 255); //It is equal to HInfo[ID][ownername] = housename

The code that you tried to put was wrong.


I hope that i have helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)