undefined symbol "name"
#10

Quote:
Originally Posted by ******
Посмотреть сообщение
Well first I suggest you finish reading it - and don't try skip sections.
To follow up I read it and saw how stupid I was (Should have read my load user data function first before being stupid!) ^^ however I am not sure if I am using this right as I am getting the following errors:
pawn Код:
Y:\Documents\SpectralRP\gamemodes\spectralrp.pwn(271) : warning 213: tag mismatch
Y:\Documents\SpectralRP\gamemodes\spectralrp.pwn(272) : warning 213: tag mismatch
Y:\Documents\SpectralRP\gamemodes\spectralrp.pwn(273) : warning 213: tag mismatch
Y:\Documents\SpectralRP\gamemodes\spectralrp.pwn(275) : error 035: argument type mismatch (argument 2)
Y:\Documents\SpectralRP\gamemodes\spectralrp.pwn(288) : error 035: argument type mismatch (argument 1)
And here is the changes that I made to the code, I'm not sure if it will read the houses on server startup though :S
pawn Код:
INI:ini[housedata](name[], value[])
{
    new houseowner[24];
    for(new i = 0; i < MAX_HOUSES;i++)
    {
        INI_Int("Price",HInfo[i][Price]);
        INI_Int("Owned",HInfo[i][Owned]);
        INI_Int("XPos",HInfo[i][XPos]);
        INI_Int("YPos",HInfo[i][YPos]);
        INI_Int("ZPos",HInfo[i][ZPos]);
        INI_Int("VirtualWorld",HInfo[i][VirtualWorldID]);
        INI_String("Owner", houseowner, sizeof(houseowner));
    }
    return 1;
}
public LoadHouses()
{
    new file[60],houseowner[24];
    for(new i = 0; i < MAX_HOUSES;i++)
    {
        format(file,sizeof(file),"Houses/%i.ini",i);
        if(!fexist(file)) continue;
        new INI:ini = INI_Open(file);
        format(HInfo[i][Owner],24,"%s",houseowner);
        INI_Load(ini);
        HouseEnter[i]  = CreateDynamicCP(HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos],1.5,HInfo[i][VirtualWorldID]);
        HouseExit[i] = CreateDynamicCP(443.9237,509.4609,1001.4195,1.5,HInfo[i][VirtualWorldID]);
        new labelstring[100];
        switch(HInfo[i][Owned])
        {
            case 0:{format(labelstring,sizeof(labelstring),"Owned: No \nPrice: %i",HInfo[i][Price]);}
            case 1:{format(labelstring,sizeof(labelstring),"Owned: Yes \nPrice: %i \nOwner: %s",HInfo[i][Price],HInfo[i][Owner]);}
        }
        HInfo[i][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos],25.0,HInfo[i][VirtualWorldID]);
        HouseCount++;
        INI_Close(ini);
    }
    return 1;
}
Reply


Messages In This Thread
undefined symbol "name" - by NewerthRoleplay - 16.10.2012, 19:04
Re: undefined symbol "name" - by trapstar2020 - 16.10.2012, 19:09
Re: undefined symbol "name" - by NewerthRoleplay - 16.10.2012, 19:17
Re: undefined symbol "name" - by gtakillerIV - 16.10.2012, 19:19
Re: undefined symbol "name" - by davve95 - 16.10.2012, 19:25
Re: undefined symbol "name" - by trapstar2020 - 16.10.2012, 19:27
Re: undefined symbol "name" - by NewerthRoleplay - 16.10.2012, 19:31
Re: undefined symbol "name" - by NewerthRoleplay - 16.10.2012, 19:35
Re: undefined symbol "name" - by NewerthRoleplay - 16.10.2012, 19:46
Re: undefined symbol "name" - by NewerthRoleplay - 16.10.2012, 20:44

Forum Jump:


Users browsing this thread: 1 Guest(s)