Help with createhouse command..
#1

Hey, so I started a house system, (very basic) so I have /createhouse(exterior/interior) and I get warnings with the

Float:Position[3](x,y,z);

COMMAND:
pawn Код:
CMD:createhouse(playerid,params[])
{
    for(new i; i < MAX_HOUSES; i++)
    {
        if(PlayerInfo[playerid][Adminlevel] < 4) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You're not authorized to use this command");
        if(strcmp(params,"exterior",false)==0)
        {
            new Float:Position[3];
            GetPlayerPos(playerid,Position[0],Position[1],Position[2]);
            HouseInfo[i][ExteriorX] = Position[0];
            HouseInfo[i][ExteriorY] = Position[1];
            HouseInfo[i][ExteriorZ] = Position[2];
            SendClientMessage(playerid,ORANGE,"House Exterior Set [/createhouse interior]");
        }
        if(strcmp(params,"interior",false)==0)
        {
            new Float:Position[3];
            GetPlayerPos(playerid,Position[0],Position[1],Position[2]);
            HouseInfo[i][InteriorX] = Position[0];
            HouseInfo[i][InteriorY] = Position[1];
            HouseInfo[i][InteriorZ] = Position[2];
            SendClientMessage(playerid,ORANGE,"House Interior Set.");
        }
    }
    return 1;
}
WARNINGS
Код:
C:\Documents and Settings\Customer\Desktop\Fort Carson Roleplay\gamemodes\gamemode.pwn(1121) : warning 213: tag mismatch
C:\Documents and Settings\Customer\Desktop\Fort Carson Roleplay\gamemodes\gamemode.pwn(1122) : warning 213: tag mismatch
C:\Documents and Settings\Customer\Desktop\Fort Carson Roleplay\gamemodes\gamemode.pwn(1123) : warning 213: tag mismatch
C:\Documents and Settings\Customer\Desktop\Fort Carson Roleplay\gamemodes\gamemode.pwn(1130) : warning 213: tag mismatch
C:\Documents and Settings\Customer\Desktop\Fort Carson Roleplay\gamemodes\gamemode.pwn(1131) : warning 213: tag mismatch
C:\Documents and Settings\Customer\Desktop\Fort Carson Roleplay\gamemodes\gamemode.pwn(1132) : warning 213: tag mismatch
C:\Documents and Settings\Customer\Desktop\Fort Carson Roleplay\gamemodes\gamemode.pwn(1224) : warning 203: symbol is never used: "time"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Warnings.
IGNORE THE LAST WARNING
Reply
#2

In your enum, where ExteriorX,Y and Z, put "Float:" behind of them.
And you command fixed:
pawn Код:
CMD:createhouse(playerid,params[])
{
    for(new i; i < MAX_HOUSES; i++)
    {
        if(PlayerInfo[playerid][Adminlevel] < 4) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You're not authorized to use this command");
        if(strcmp(params,"exterior",false)==0)
        {
            GetPlayerPos(playerid,HouseInfo[i][ExteriorX],HouseInfo[i][ExteriorY],HouseInfo[i][ExteriorZ]);
            SendClientMessage(playerid,ORANGE,"House Exterior Set [/createhouse interior]");
        }
        if(strcmp(params,"interior",false)==0)
        {
            GetPlayerPos(playerid,HouseInfo[i][InteriorX],HouseInfo[i][InteriorY],HouseInfo[i][InteriorZ]);
            SendClientMessage(playerid,ORANGE,"House Interior Set.");
        }
    }
    return 1;
}
Reply
#3

EDIT: nvm, firecat was too fast on that one.
Reply
#4

Thanks with that, I feel so silly :P repped firecat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)