SA-MP Forums Archive
Problem with team cars..... + Rep - 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: Problem with team cars..... + Rep (/showthread.php?tid=323704)



Problem with team cars..... + Rep - Scrillex - 06.03.2012

Код:
error 001: expected token: "-identifier-", but found "-integer value-"
warning 213: tag mismatch
error 032: array index out of bounds (variable "Cars")
enum TeamCars
{
Pirates,
Pirates1,
Police,
WaterP,
Mafia,
Mafia1
} //First error here

Cars[Mafia] = CreateVehicle(533,-679.59997559,949.40002441,11.89999962,0.00000000,-1,-1); //Feltzer // second and 3. error


Re: Problem with team cars..... + Rep - ]Rafaellos[ - 06.03.2012

Quote:

enum TeamCars
{
Pirates,
Pirates1,
Police,
WaterP,
Mafia,
Mafia1
};

You forgot the ;


Re: Problem with team cars..... + Rep - FalconX - 06.03.2012

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
Код:
error 001: expected token: "-identifier-", but found "-integer value-"
warning 213: tag mismatch
error 032: array index out of bounds (variable "Cars")
enum TeamCars
{
Pirates,
Pirates1,
Police,
WaterP,
Mafia,
Mafia1
} //First error here

Cars[Mafia] = CreateVehicle(533,-679.59997559,949.40002441,11.89999962,0.00000000,-1,-1); //Feltzer // second and 3. error
after the enum add

pawn Код:
new tCars[TeamCars];
and

change Cars[Mafia] to tCars[Mafia] and try..

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
You forgot the ;
My dear you made me LAUGH OUT LOUDLY ^^ There is no need of semi column or whatever it is called ";" in enum lol.

This might help!

-FalconX


Re: Problem with team cars..... + Rep - ]Rafaellos[ - 06.03.2012

In my script the enum if i dont put }; it have error.


Re: Problem with team cars..... + Rep - FalconX - 06.03.2012

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
In my script the enum if i dont put }; it have error.
Strange script eh

Well I don't think there is a need of ";" in the script when It works without the ";" anyways, I don't use ; with enums :P

-FalconX


Re: Problem with team cars..... + Rep - Scrillex - 06.03.2012

Thank you all


Re: Problem with team cars..... + Rep - Scrillex - 06.03.2012

Same error!


Re: Problem with team cars..... + Rep - Mike_Peterson - 06.03.2012

pawn Код:
enum TeamCars
{
Pirates,
Pirates1,
Police,
WaterP,
Mafia,
Mafia1,
}

new Cars[TeamCars];

//OnGameModeInit
Cars[Mafia] = CreateVehicle(533,-679.59997559,949.40002441,11.89999962,0.00000000,-1,-1,-1); //Feltzer
Made in 15 seconds, I tested it in my script, didnt get any errors, enjoy.


AW: Re: Problem with team cars..... + Rep - Campbell- - 06.03.2012

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
Same error!
Which one and what's your current code?


Re: Problem with team cars..... + Rep - Scrillex - 06.03.2012

The same as previous error.