Strange errors to my command
#1

Well,i was scripting this command the last 3 days (i am a newbie scripter),
PHP код:
if(strcmp(cmd"/sethouse"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
houseid = -1;
            new 
Float:XFloat:YFloat:Z
            GetPlayerPos
(playeridX,Y,Z);
            if (
PlayerInfo[playerid][pAdmin] >= 5)
            {
                new 
string2[256];
                for(new 
0sizeof(HouseInfo); h++)
                {
                    if(
HouseInfo[h][hSetted] == 1)
                    {
                        
houseid 1;
                    }
                }
                if(
HouseInfo[houseid][hSetted] == 0)
                {
                    
format(stringsizeof(string),"SFR-RP/Properties/%d.ini",houseid);
                    
dini_Create(string);
                    
tmp strtok(cmdtextidx);
                    if(!
strlen(tmp))
                    {
                        
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /sethouse [type]");
                        
SendClientMessage(playeridCOLOR_GRAD2"TYPES: 0 Apartment - 1 Small - 2 Medium - 3 Big");
                        return 
1;
                    }
                    new 
type;
                    
type strval(tmp);
                    if(
type == 0)
                    {
                        
HouseInfo[houseid][hValue] = 45000;
                        
HouseInfo[houseid][hLevel] = 3;
                        
strmid(HouseInfo[houseid][hDiscription], "House Apartment"0strlen("House Apartment"), 255);
                        if(
nextapartment == 24)
                        {
                            
nextapartment 25;
                            
HouseInfo[houseid][hExitx] = 244.411987HouseInfo[houseid][hExity] = 305.032990HouseInfo[houseid][hExitz] = 999.231995;
                            
HouseInfo[houseid][hInt] = 1;
                        }
                        else if(
nextapartment == 25)
                        {
                            
nextapartment 27;
                            
HouseInfo[houseid][hExitx] = 266.4991HouseInfo[houseid][hExity] = 304.9922HouseInfo[houseid][hExitz] = 999.1484;
                            
HouseInfo[houseid][hInt] = 2;
                        }
                        else if(
nextapartment == 27)
                        {
                            
nextapartment 29;
                            
HouseInfo[houseid][hExitx] = 302.181000HouseInfo[houseid][hExity] = 300.722992HouseInfo[houseid][hExitz] = 999.231995;
                            
HouseInfo[houseid][hInt] = 4;
                        }
                        else if(
nextapartment == 29)
                        {
                            
nextapartment 24;
                            
HouseInfo[houseid][hExitx] = 346.870025HouseInfo[houseid][hExity] = 309.259033HouseInfo[houseid][hExitz] = 999.155700;
                            
HouseInfo[houseid][hInt] = 6;
                        }
                    }
                    else if(
type == 1)
                    {
                        
HouseInfo[houseid][hValue] = 50000;
                        
HouseInfo[houseid][hLevel] = 4;
                        
strmid(HouseInfo[houseid][hDiscription], "House Small"0strlen("House Small"), 255);
                        if(
nexthouse == 2)
                        {
                            
nexthouse 3;
                            
HouseInfo[houseid][hExitx] = 225.756989HouseInfo[houseid][hExity] = 1240.000000HouseInfo[houseid][hExitz] = 1082.149902;
                            
HouseInfo[houseid][hInt] = 2;
                        }
                        else if(
nexthouse == 3)
                        {
                            
nexthouse 6;
                            
HouseInfo[houseid][hExitx] = 223.1929HouseInfo[houseid][hExity] = 1287.0780HouseInfo[houseid][hExitz] = 1082.1406;
                            
HouseInfo[houseid][hInt] = 1;
                        }
                        else if(
nexthouse == 6)
                        {
                            
nexthouse 12;
                            
HouseInfo[houseid][hExitx] = 328.1066HouseInfo[houseid][hExity] = 1478.0106HouseInfo[houseid][hExitz] = 1084.4375;
                            
HouseInfo[houseid][hInt] = 15;
                        }
                        else if(
nexthouse == 12)
                        {
                            
nexthouse 41;
                            
HouseInfo[houseid][hExitx] = 260.983978HouseInfo[houseid][hExity] = 1286.549927HouseInfo[houseid][hExitz] = 1080.299927;
                            
HouseInfo[houseid][hInt] = 4;
                        }
                        else if(
nexthouse == 41)
                        {
                            
nexthouse 2;
                            
HouseInfo[houseid][hExitx] = 446.5014HouseInfo[houseid][hExity] = 507.0295HouseInfo[houseid][hExitz] = 1001.4195;
                            
HouseInfo[houseid][hInt] = 12;
                        }
                    }
                    else if(
type == 2)
                    {
                        
HouseInfo[houseid][hValue] = 65000;
                        
HouseInfo[houseid][hLevel] = 6;
                        
strmid(HouseInfo[houseid][hDiscription], "House Medium"0strlen("House Medium"), 255);
                        if(
nextmedium == 17)
                        {
                            
nextmedium 19;
                            
HouseInfo[houseid][hExitx] = 140.2267HouseInfo[houseid][hExity] = 1365.9246HouseInfo[houseid][hExitz] = 1083.8594;
                            
HouseInfo[houseid][hInt] = 5;
                        }
                        else if(
nextmedium == 19)
                        {
                            
nextmedium 21;
                            
HouseInfo[houseid][hExitx] = -68.294098HouseInfo[houseid][hExity] = 1353.469971HouseInfo[houseid][hExitz] = 1080.279907;
                            
HouseInfo[houseid][hInt] = 6;
                        }
                        else if(
nextmedium == 21)
                        {
                            
nextmedium 30;
                            
HouseInfo[houseid][hExitx] = -42.581997HouseInfo[houseid][hExity] = 1408.109985HouseInfo[houseid][hExitz] = 1084.449951;
                            
HouseInfo[houseid][hInt] = 8;
                        }
                        else if(
nextmedium == 30)
                        {
                            
nextmedium 32;
                            
HouseInfo[houseid][hExitx] = 2495.6416HouseInfo[houseid][hExity] = -1692.2361HouseInfo[houseid][hExitz] = 1014.7422;
                            
HouseInfo[houseid][hInt] = 3;
                        }
                        else if(
nextmedium == 32)
                        {
                            
nextmedium 38;
                            
HouseInfo[houseid][hExitx] = 2468.4502HouseInfo[houseid][hExity] = -1698.4801HouseInfo[houseid][hExitz] = 1013.5078;
                            
HouseInfo[houseid][hInt] = 2;
                        }
                        else if(
nextmedium == 38)
                        {
                            
nextmedium 39;
                            
HouseInfo[houseid][hExitx] = 2807.9172HouseInfo[houseid][hExity] = -1174.4333HouseInfo[houseid][hExitz] = 1025.5703;
                            
HouseInfo[houseid][hInt] = 8;
                        }
                        else if(
nextmedium == 39)
                        {
                            
nextmedium 17;
                            
HouseInfo[houseid][hExitx] = 318.7010HouseInfo[houseid][hExity] = 1114.7716HouseInfo[houseid][hExitz] = 1083.8828;
                            
HouseInfo[houseid][hInt] = 5;
                        }
                    }
                    else if(
type == 3)
                    {
                        
HouseInfo[houseid][hValue] = 85000;
                        
HouseInfo[houseid][hLevel] = 9;
                        
strmid(HouseInfo[houseid][hDiscription], "House Big"0strlen("House Big"), 255);
                        if(
nextbig == 1)
                        {
                            
nextbig 4;
                            
HouseInfo[houseid][hExitx] = 235.3054HouseInfo[houseid][hExity] = 1186.6835HouseInfo[houseid][hExitz] = 1080.2578;
                            
HouseInfo[houseid][hInt] = 3;
                        }
                        else if(
nextbig == 4)
                        {
                            
nextbig 11;
                            
HouseInfo[houseid][hExitx] = 225.630997HouseInfo[houseid][hExity] = 1022.479980HouseInfo[houseid][hExitz] = 1084.069946;
                            
HouseInfo[houseid][hInt] = 7;
                        }
                        else if(
nextbig == 11)
                        {
                            
nextbig 13;
                            
HouseInfo[houseid][hExitx] = 227.722992HouseInfo[houseid][hExity] = 1114.389893HouseInfo[houseid][hExitz] = 1081.189941;
                            
HouseInfo[houseid][hInt] = 5;
                        }
                        else if(
nextbig == 13)
                        {
                            
nextbig 14;
                            
HouseInfo[houseid][hExitx] = 221.7330HouseInfo[houseid][hExity] = 1140.5146HouseInfo[houseid][hExitz] = 1082.6094;
                            
HouseInfo[houseid][hInt] = 4;
                        }
                        else if(
nextbig == 14)
                        {
                            
nextbig 15;
                            
HouseInfo[houseid][hExitx] = 27.132700HouseInfo[houseid][hExity] = 1341.149902HouseInfo[houseid][hExitz] = 1084.449951;
                            
HouseInfo[houseid][hInt] = 10;
                        }
                        else if(
nextbig == 15)
                        {
                            
nextbig 40;
                            
HouseInfo[houseid][hExitx] = -262.601990HouseInfo[houseid][hExity] = 1456.619995HouseInfo[houseid][hExitz] = 1084.449951;
                            
HouseInfo[houseid][hInt] = 4;
                        }
                        else if(
nextbig == 40)
                        {
                            
nextbig 1;
                            
HouseInfo[houseid][hExitx] = 2324.3267HouseInfo[houseid][hExity] = -1149.1440HouseInfo[houseid][hExitz] = 1050.7101;
                            
HouseInfo[houseid][hInt] = 12;
                        }
                    }
                    
HouseInfo[houseid][hEntrancex] = X;
                    
HouseInfo[houseid][hEntrancey] = Y;
                    
HouseInfo[houseid][hEntrancez] = Z;
                    
HouseInfo[houseid][hWorld] = houseid;
                    
HouseInfo[houseid][hSetted] = 1;
                    
strmid(HouseInfo[houseid][hOwner],"The State",0,strlen("The State"),255);
                    
strmid(HouseInfo[houseid][hMessage],"House",0,strlen("House"),255);
                    
EvaluateHouse(houseid);
                    
format(stringsizeof(string),"* Created the house number %d. The house was set automatically, Use /edit to edit it if you want.",houseid);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
format(string,sizeof(string),"[ADMIN]: %s Has Set House: [%d]'s entrance to [%f - %f - %f].",sendername,houseid,X,Y,Z);
                    
ABroadCast(COLOR_LIGHTRED,string5);
                    
format(string2,sizeof(string2),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[houseid][hWorld], HouseInfo[houseid][hValue],HouseInfo[houseid][hDiscription], HouseInfo[houseid][hLevel]);
                    
HouseLabel[houseid] = Create3DTextLabel(string2 ,0x00FF00AA,X,Y,Z,2501);
                    
HousePickup[houseid] = CreateDynamicPickup(12731HouseInfo[houseid][hEntrancex], HouseInfo[houseid][hEntrancey], HouseInfo[houseid][hEntrancez]);
                    
OnPropUpdate(1,houseid);
                    
OnPropTextdrawUpdate(1houseid);
                    
OnHousePickupUpdate(houseid);
                    
SendClientMessage(playeridCOLOR_GREY,"* The label will appear on next server restart due to limit of labels!");
                    new 
ymd;
                    new 
h,mi,s;
                    
getdate(y,m,d);
                    
gettime(h,mi,s);
                    
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Set the house %d.",d,m,y,h,mi,s,sendername,giveplayer,houseid);
                    
AdminLog(string);
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"* ERROR: Automatic detected Houseid already setted!");
                    return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"** you are not authorized to use that command!");
            }
        }
        return 
1;
    } 
And finally?I got these errors -.-
PHP код:
...\pawno\include\dini.inc(40) : error 017undefined symbol "fexist"
...\pawno\include\dini.inc(40) : warning 215expression has no effect
...\pawno\include\dini.inc(40) : error 001expected token";"but found ")"
...\pawno\include\dini.inc(40) : error 029invalid expressionassumed zero
...\pawno\include\dini.inc(40) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply


Messages In This Thread
Strange errors to my command - by geohareas - 17.01.2013, 20:28
Re: Strange errors to my command - by Lynn - 17.01.2013, 20:30
Re: Strange errors to my command - by geohareas - 17.01.2013, 20:32
Re: Strange errors to my command - by Lynn - 17.01.2013, 20:35
Re: Strange errors to my command - by geohareas - 17.01.2013, 20:36
Re: Strange errors to my command - by geohareas - 17.01.2013, 20:39
Re: Strange errors to my command - by Lynn - 17.01.2013, 20:42
Re: Strange errors to my command - by Vince - 17.01.2013, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)