(7) : error 021: symbol already defined: "house1Exit" (17) : error 035: argument type mismatch (argument 1) (2 : error 035: argument type mismatch (argument 1) (36) : error 017: undefined symbol "house2Exit" (57) : error 017: undefined symbol "house2Exit" |
new house2Ent, house1Exit;
if(!strcmp(type, "enter", true))
if(!strcmp(type, "exit", true))
house2Exit = CreateDynamicCP(x,y,z,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
else if(checkpointid == house2Exit)
#include <a_samp>
#include <Streamer>
#include <zcmd>
#include <sscanf2>
new house1Ent, house1Exit;
new house2Ent, house1Exit;
CMD:createhouse(playerid, params[])
{
new interior, type;
new Float:x, Float:y, Float:z;
if(sscanf(params,"is", interior, type)) return SendClientMessage(playerid, -1, "/createhouse [1~2][type]");
if(interior > 2) SendClientMessage(playerid, -1, "Invaild Interior ID");
GetPlayerPos(playerid, x, y, z);
if(!strcmp(type, "enter", true))
{
if(interior == 1)
{
house1Ent = CreateDynamicCP( x,y,z,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
}
else if(interior == 2)
{
house2Ent = CreateDynamicCP(x,y,z,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
}
}
if(!strcmp(type, "exit", true))
{
if(interior == 1)
{
house1Exit = CreateDynamicCP( x,y,z,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
}
else if(interior == 2)
{
house2Exit = CreateDynamicCP(x,y,z,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
}
}
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == house1Ent)
{
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,271.884979,306.631988,999.148437);
}
else if(checkpointid == house2Ent)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,1527.229980,-11.574499,1002.097106 );
}
else if(checkpointid == house1Exit)
{
SetPlayerPos(playerid,272.884979,306.631988,999.148437);
}
else if(checkpointid == house2Exit)
{
SetPlayerPos(playerid,1526.229980,-11.574499,1002.097106);
}
return 1;
}
new house1Ent, house1Exit; new house2Ent, house1Exit;
new house1Ent, house1Exit; new house2Ent, house2Exit;
You have already define House1exit, try this
Change Код:
new house1Ent, house1Exit; new house2Ent, house1Exit; Код:
new house1Ent, house1Exit; new house2Ent, house2Exit; |
(17) : error 035: argument type mismatch (argument 1)
(28) : error 035: argument type mismatch (argument 1)
if(!strcmp(type, "enter", true))
if(!strcmp(type, "exit", true))
if(!strcmp(type, "enter", true))
if(strcmp(type, "enter", true))
if(!strcmp(type, "exit", true))
if(strcmp(type, "exit", true))
if(!strcmp("/command", command-text))
Change
Код:
if(!strcmp(type, "enter", true)) Код:
if(strcmp(type, "enter", true)) Код:
if(!strcmp(type, "exit", true)) Код:
if(strcmp(type, "exit", true)) |
(17) : error 035: argument type mismatch (argument 1)
(28) : error 035: argument type mismatch (argument 1)
if(strcmp(type, "enter", true))
if(strcmp(type, "exit", true))
if(strcmp(params, "enter", true) if(strcmp(params, "exit", true)
Change
Код:
if(!strcmp(type, "enter", true)) Код:
if(strcmp(type, "enter", true)) Код:
if(!strcmp(type, "exit", true)) Код:
if(strcmp(type, "exit", true)) |
new interior, type[16];
if(!strcmp(type, "enter", true))
if(!strcmp(type, "exit", true))
That's wrong.
- You must declare type as string. PHP код:
PHP код:
PHP код:
|
/createhouse [1~2][type]