Is this a wrong way to check?
#1

Well, i check if the playerid matches the houseowner id, im not sure this shows an error, do i use any other way?

Код:
 playerid == houseOwner[playerid]
This shows me error.
Код:
invalid subscript (not an array or too many subscripts): "houseOwner"
warning 215: expression has no effect
 error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
im not sure why.
Reply
#2

Please show the array houseOwner and the code where you use playerid (that conditional part)
Reply
#3

try to save houseonwer on other thing and then check if same example:
PHP код:
new houseid1 houseOwner[playerid];
// then:
if(playerid == houseOwner[playerid]) { 
//... 
Reply
#4

Okay, this is my housedata enum
Код:
enum houseData {
	houseID,
	houseExists,
	houseOwner,
	housePrice,
	houseAddress[32],
	Float:housePos[4],
	Float:houseInt[4],
	houseInterior,
	houseExterior,
	houseExteriorVW,
	houseLocked,
	houseMoney,
	houseMapIcon,
	Text3D:houseText3D,
	housePickup,
	houseLights,
	houseWeapons[10],
	houseAmmo[10]
};
and i check this in a command
Код:
if (playerid == houseOwner[playerid])
but it shows me error. the one mentioned above im not sure why.
Reply
#5

Quote:
Originally Posted by [ND]xXZeusXx.
Посмотреть сообщение
Okay, this is my housedata enum
Код:
enum houseData {
	houseID,
	houseExists,
	houseOwner,
	housePrice,
	houseAddress[32],
	Float:housePos[4],
	Float:houseInt[4],
	houseInterior,
	houseExterior,
	houseExteriorVW,
	houseLocked,
	houseMoney,
	houseMapIcon,
	Text3D:houseText3D,
	housePickup,
	houseLights,
	houseWeapons[10],
	houseAmmo[10]
};
and i check this in a command
Код:
if (playerid == houseOwner[playerid])
but it shows me error. the one mentioned above im not sure why.
you need to add something below them to load from example:
PHP код:
new HouseInfo[MAX_HOUSES][houseData]; 
then later //
PHP код:
if (playerid == Houseinfo[playerid][houseOwner]) { 
Reply
#6

Show also the array that uses houseData, also the command code duh.
Reply
#7

Quote:
Originally Posted by jlalt
Посмотреть сообщение
you need to add something below them to load from example:
PHP код:
new HouseInfo[MAX_HOUSES][houseData]; 
then later //
PHP код:
if (playerid == Houseinfo[playerid][houseOwner]) { 
Thankyou, fixed.
it's supposed to be.
Код:
playerid == HouseData[id][houseOwner]
Stupid me :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)