SA-MP Forums Archive
error 001: expected token: ")", but found "-identifier-" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 001: expected token: ")", but found "-identifier-" (/showthread.php?tid=571049)



error 001: expected token: ")", but found "-identifier-" - d3ll - 15.04.2015

:S

pawn Код:
stock UpdateHouseInterior(houseID)
{
    if(houseID == INVALID_HOUSE_ID) return 0;
    if(IsValidDynamicObject(HInfo[houseID][HouseInteriorObject])
        DestroyDynamicObject(HInfo[houseID][HouseInteriorObject]); // Error here
    if(IsValidDynamicPickup(HInfo[houseID][WarDrobePickup])
        DestroyDynamicPickup(HInfo[houseID][WarDrobePickup]); // error here
    switch(HInfo[houseID][HouseInterior])
    {
        case 0:
        {
            HInfo[houseID][HouseInteriorObject] = CreateDynamicObject(15042, 2273.83179, 1014.40369, 80.55810,   0.00000, 0.00000, 0.00000, (houseID+1), (houseID+1));
            HInfo[houseID][WarDrobePickup] = CreateDynamicPickup(1275, 1, HInfo[houseID][WarDrobe][0], HInfo[houseID][WarDrobe][2], HInfo[houseID][WarDrobe][2], (houseID+1), (houseID+1));
        }
    }
    return 1;
}
Код:
C:\Users\Brandon\Desktop\Roleplay Server\gamemodes\M-RPv1.pwn(402) : error 001: expected token: ")", but found "-identifier-"
C:\Users\Brandon\Desktop\Roleplay Server\gamemodes\M-RPv1.pwn(404) : error 001: expected token: ")", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: error 001: expected token: ")", but found "-identifier-" - Darrenr - 15.04.2015

Your missing the ")" at the end of the statements above the errors

if(IsValidDynamicPickup(HInfo[houseID][WarDrobePickup])


Re: error 001: expected token: ")", but found "-identifier-" - d3ll - 15.04.2015

I didn't even see that :@ fml


Re: error 001: expected token: ")", but found "-identifier-" - Azula - 15.04.2015

PHP код:
if(houseID == INVALID_HOUSE_ID) return 0;
    if(  
IsValidDynamicObject  (  HInfo[houseID][HouseInteriorObject] ) )
        
DestroyDynamicObject(HInfo[houseID][HouseInteriorObject]); 
    if( 
IsValidDynamicPickupHInfo[houseID][WarDrobePickup] ) )
        
DestroyDynamicPickup(HInfo[houseID][WarDrobePickup]); 



Re: error 001: expected token: ")", but found "-identifier-" - _GHT_MarK445 - 15.04.2015

You really need to look up to the whole line, if the brackets are closed. Thereby when you are just editing something and using different methods you are enable to forgot, that you need to close this, and you are asking yourself if you did not already close it, that is weird moment but you have to look up for that in future.