SA-MP Forums Archive
This crashes the compiler, could anyone tell me why? - 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: This crashes the compiler, could anyone tell me why? (/showthread.php?tid=571080)



This crashes the compiler, could anyone tell me why? - Dokins - 15.04.2015

pawn Код:
new FurnitureArray[][e_furn] =
{
    //
    // Model, name, cost, storable, wepslots
    //
    {2290, GetFurniName(2290), InfPrice(100), 0, 0}
    {14490, GetFurniName(14490), InfPrice(200), 0, 0}
    {1794, GetFurniName(1794), InfPrice(700), 1, 1}
    {2306, GetFurniName(2306), InfPrice(125), 1, 1}
    {2073, GetFurniName(2073), InfPrice(100), 0, 0}
    {1734, GetFurniName(1734), InfPrice(130), 0, 0}
    {2100, GetFurniName(2100), InfPrice(800), 0, 0}
    {14527, GetFurniName(14527), InfPrice(80), 0, 0}

};



Re: This crashes the compiler, could anyone tell me why? - Ahmad45123 - 15.04.2015

The lines he to end with a comma, So it'd be:
pawn Код:
new FurnitureArray[][e_furn] =
{
    //
    // Model, name, cost, storable, wepslots
    //
    {2290, GetFurniName(2290), InfPrice(100), 0, 0},
    {14490, GetFurniName(14490), InfPrice(200), 0, 0},
    {1794, GetFurniName(1794), InfPrice(700), 1, 1},
    {2306, GetFurniName(2306), InfPrice(125), 1, 1},
    {2073, GetFurniName(2073), InfPrice(100), 0, 0},
    {1734, GetFurniName(1734), InfPrice(130), 0, 0},
    {2100, GetFurniName(2100), InfPrice(800), 0, 0},
    {14527, GetFurniName(14527), InfPrice(80), 0, 0}
};
if that doesn't fix it... Show me that functions you use their. (I don't even think you can do that so I think thats the issue.)


Re: This crashes the compiler, could anyone tell me why? - R0 - 15.04.2015

as Ahmad said,put ',':
pawn Код:
new FurnitureArray[][e_furn] =
{
    //
    // Model, name, cost, storable, wepslots
    //
    {2290, GetFurniName(2290), InfPrice(100), 0, 0},
    {14490, GetFurniName(14490), InfPrice(200), 0, 0},
    {1794, GetFurniName(1794), InfPrice(700), 1, 1},
    {2306, GetFurniName(2306), InfPrice(125), 1, 1},
    {2073, GetFurniName(2073), InfPrice(100), 0, 0},
    {1734, GetFurniName(1734), InfPrice(130), 0, 0},
    {2100, GetFurniName(2100), InfPrice(800), 0, 0},
    {14527, GetFurniName(14527), InfPrice(80), 0, 0}
};



Re: This crashes the compiler, could anyone tell me why? - Dokins - 15.04.2015

I added the commas and it made no difference!

You were right it's the functions, thanks a lot.


Re: This crashes the compiler, could anyone tell me why? - Ahmad45123 - 15.04.2015

Quote:
Originally Posted by Dokins
Посмотреть сообщение
I added the commas and it made no difference!

You were right it's the functions, thanks a lot.
You mean it was compiling without them ? :/


Re: This crashes the compiler, could anyone tell me why? - Dokins - 15.04.2015

It's fixed, thanks a lot. It was the functions!