/nos command, 3 errors. - 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: /nos command, 3 errors. (
/showthread.php?tid=329866)
/nos command, 3 errors. -
flashsnake - 30.03.2012
Hello, I have 3 errors with my cmd /nos. I tried writing this from scratch, but obviously something went wrong.
pawn Код:
Dangerous TDM V0.2\gamemodes\ExplosionDMV0.2.pwn(345) : error 033: array must be indexed (variable "carid")
Dangerous TDM V0.2\gamemodes\ExplosionDMV0.2.pwn(346) : error 033: array must be indexed (variable "carid")
Dangerous TDM V0.2\gamemodes\ExplosionDMV0.2.pwn(350) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
These are my errors, I tried solving these but couldn't do it. I am adding my CMD -
pawn Код:
CMD:nos(playerid, params[])
{
new carid[32];
carid = GetPlayerVehicleID(playerid); // LINE 345
if(carid < 0) // LINE 346
{
SendClientMessage(playerid, COL_BRIGHTRED, "ERROR: Sa ei ole autos sees!");
}else{
AddVehicleComponent(carid, 1010); // LINE 350
}
return 1;
}
Re: /nos command, 3 errors. -
emokidx - 30.03.2012
pawn Код:
CMD:nos(playerid, params[])
{
new carid;
carid = GetPlayerVehicleID(playerid);
if(carid < 0)
{
SendClientMessage(playerid, COL_BRIGHTRED, "ERROR: Sa ei ole autos sees!");
}
else
{
AddVehicleComponent(carid, 1010);
}
return 1;
}
it should be an integer