tag mismatch i cant fix this shit. -
caoraivoso3 - 07.09.2013
this is the all public
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new id = 0; id < MAX_CASAS;id++)
if(pickupid == entradacasa[id])
{
new pName[24];//Creating the new var for the players name
GetPlayerName(playerid,pName,24);//Storing the players name
if(CInfo[id][nomedacasa] == 1 && strcmp(CInfo[id][nomedacasa],pName) == 0)//String comparing between the players name and the house owners name, to check if they match.
{
SetPVarInt(playerid,"PlayersInteriorHouse",GetPlay erInterior(playerid));//Storing, so later we can reset it back
SetPVarInt(playerid,"PlayerVirtualWorldHouse",GetP layerVirtualWorld(playerid));//Storing, so later we can reset it back
SetPlayerInterior(playerid,12);//Setting the players interior.
SetPlayerPos(playerid,446.7281,507.0475,1001.4195) ;//Setting the players position.
SetPlayerVirtualWorld(playerid,CInfo[id][vw]);//Preventing players from different houses, finding each other.
{
if(CInfo[id][nomedacasa] == 1 && strcmp(CInfo[id][nomedacasa],pName) != 0)//Checking if the house is owned but the house owner and the players name don't match.
SendClientMessage(playerid,-1,"Nao es dono desta casa.");
}
if(CInfo[id][nomedacasa] == 0)//Simply checking if the house isn't owned.
{
SendClientMessage(playerid,-1,"/comprarcasa para comprar esta casa.");
}
}
if(pickupid == saidacasa[id])//Checking if the checkpointid is an House exit
{
SetPlayerPos(playerid, CInfo[id][entradax], CInfo[id][entraday], CInfo[id][entradaz]);//Setting the players position to checkpoint position +3
SetPlayerInterior(playerid,GetPVarInt(playerid,"Pl ayersInteriorHouse"));//Setting the players interior to the one we stored
SetPlayerVirtualWorld(playerid,GetPVarInt(playerid ,"PlayerVirtualWorldHouse"));//Setting the players virtual world to the one we stored.
}
}
return 1;
}
the problem is that is giving tag mismatch in the SetPlayerPos(playerid, CInfo[id][entradax], CInfo[id][entraday], CInfo[id][entradaz]);
i think the problem is in the id because i replace the entradax, entraday and entradaz and give me the same problem.
help me if you can and thanks
Re: tag mismatch i cant fix this shit. -
Konstantinos - 07.09.2013
First of all, show us the enum that is used from
CInfo.
Then, just a test:
pawn Код:
// Replace:
SetPlayerPos(playerid, CInfo[id][entradax], CInfo[id][entraday], CInfo[id][entradaz]);
// To:
SetPlayerPos(playerid, 0.0, 0.0, 0.0);
And compile. Does it still give the tag mismatch? By the way, the id is fine. It's an integer.
Re: tag mismatch i cant fix this shit. -
ArkoUK - 07.09.2013
Can you put your code inside of the PAWN tags please, makes it easier to read, also are they floats in the enum? E.g
pawn Код:
enum CInfo{
Float:entradax
}
Re: tag mismatch i cant fix this shit. -
caoraivoso3 - 07.09.2013
my enum
enum casas
{
nomedacasa[24],
vw[6],
idcasa[5],
comprada[1],
float:entradax,
float:entraday,
float:entradaz,
interior[3],
Preco[8],
Text3D:HouseLabel
}
konstanttions i do what you say and it compiles well.
Re: tag mismatch i cant fix this shit. -
Konstantinos - 07.09.2013
And I was saying to the other thread that it should be:
pawn Код:
Float: entradax,
Float: entraday,
Float: entradaz,
and you were saying it's correct. I read "float" instead of "Float"...
Your fault.
Re: tag mismatch i cant fix this shit. -
caoraivoso3 - 07.09.2013
Quote:
Originally Posted by Konstantinos
And I was saying to the other thread that it should be:
pawn Код:
Float: entradax, Float: entraday, Float: entradaz,
and you were saying it's correct. I read "float" instead of "Float"...
Your fault.
|
but i put Float now and it says the same thing
proof:
enum casas
{
nomedacasa[24],
vw[6],
idcasa[5],
comprada[1],
Float: entradax,
Float: entraday,
Float: entradaz,
interior[3],
Preco[8],
Text3D:HouseLabel
}
Re: tag mismatch i cant fix this shit. -
Konstantinos - 07.09.2013
I compile what you gave us so far and it compiles fine.
Re: tag mismatch i cant fix this shit. -
caoraivoso3 - 07.09.2013
thanks to all i just fixed the problem and i dont even know what i do but i did it hahaha.
thanks folks