[SOLVED] Help regarding tuning - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Help regarding tuning (
/showthread.php?tid=121381)
[SOLVED] Help regarding tuning -
VonLeeuwen - 16.01.2010
Hey all,
I'm trying to make my first 'own' command (means, I didn't look at any other script regarding this subject).
I still have some errors tho...
Here they are, I hope you can fix them:
Код:
C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(1041) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(1053) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Here's my script:
Код:
1031 if (strcmp("/tune",cmdtext, true, 10) == 0)
1032 {
1033 new vehicle;
1034 new vehicleid;
1035 vehicleid = GetPlayerVehicleID(playerid);
1036 vehicle = GetVehicleModel(vehicleid);
1037 if (vehicleid == 0)
1038 {
1039 SendClientMessage(playerid,white,"You have to be in a vehicle to use this command");
1040 }
1041 else if(vehicle == 560)) // check if it's equal to a Sultan
1042 {
1043 AddVehicleComponent(vehicle,1010);
1044 AddVehicleComponent(vehicle,1026);
1045 AddVehicleComponent(vehicle,1027);
1046 AddVehicleComponent(vehicle,1028);
1047 AddVehicleComponent(vehicle,1032);
1048 AddVehicleComponent(vehicle,1034);
1049 AddVehicleComponent(vehicle,1073);
1050 ChangeVehiclePaintjob(vehicle,0);
1051 ChangeVehicleColor(vehicle,0xFFCC00,0xCCFF00);
1052 }
1053 else
1054 {
1055 AddVehicleComponent(vehicle,1010);
1056 }
1057 return 1;
1058 }
Re: Help regarding tuning -
MadeMan - 16.01.2010
pawn Код:
else if(vehicle == 560) // check if it's equal to a Sultan
You had 1 extra bracket here.
Re: Help regarding tuning -
VonLeeuwen - 16.01.2010
Thanks a lot

It's fixed.