05.05.2009, 09:46
Hi guys, im trying to make a simple function to see if the owner of the house is connected.
But im getting a few argument mismatches, can somebody help me? Cant find out how to fix them
Function:
This is how i check it:
Then this is how i get the House_1_owner:
These are the errors im getting:
Line 160
Line 298
Line 299
Can somebody fix this for me? I cant see whats wrong about this.
Thnx!
But im getting a few argument mismatches, can somebody help me? Cant find out how to fix them
Function:
pawn Код:
public OwnerConnected(playerid, name)
{
new pName[MAX_PLAYER_NAME+1];
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
GetPlayerName(i, pName, sizeof(pName));
if(!strcmp(pName, name)) {
OwnerID[playerid] = GetPlayerID(name);
}
}
}
if(OwnerID[playerid] != -1) {
return 1;
} else {
return 0;
}
}
pawn Код:
if (OwnerConnected(House_1_Owner) == 0) print("Owner is not connected!");
pawn Код:
new House_1_Owner[MAX_STRING];
pawn Код:
House_1_Owner = dini_Get("DCMain/DCHouses/House_1.ini", "Owner");
pawn Код:
E:\_Spellen\bkp\filterscripts\enterinteriors.pwn(160) : error 035: argument type mismatch (argument 1)
E:\_Spellen\bkp\filterscripts\enterinteriors.pwn(298) : error 035: argument type mismatch (argument 2)
E:\_Spellen\bkp\filterscripts\enterinteriors.pwn(299) : error 035: argument type mismatch (argument 1)
pawn Код:
if(OwnerConnected(House_1_Owner) == 0) print("owner not connected");
pawn Код:
if(!strcmp(pName, name)) {
pawn Код:
OwnerID[playerid] = GetPlayerID(name);
Thnx!