08.06.2013, 16:03
I'm trying to create two commands, one for each smoke machine on my map. When you type the command, it will check if the smoke machine already exists, if it does exist it will destroy it, if it doesn't it will create it, so basically a toggle command.
Here's my code:
And the errors I get when compiling:
Also at the top of my script I have:
Here's my code:
pawn Код:
CMD:mainsmoke(playerid, params[])
{
if(IsValidObject(mainsmoke)) //Line 257
{
DestroyObject(mainsmoke);
}
else
{
mainsmoke = CreateObject(2780, 183.95290, -1820.93359, 14.48730, 20.00000, 180.00000, 90.00000);//Main Stage Smoke Machine
}
return 1;
}
CMD:othersmoke(playerid, params[])
{
if(IsValidObject(othersmoke))
{
DestroyObject(othersmoke);
}
else
{
othersmoke = CreateObject(2780, 350.79459, -1845.34143, 3.39632, 0.00000, 0.00000, 267.86960);//Small Stage Smoke Machine
}
return 1;
}
Код:
festival2.pwn(257) : warning 202: number of arguments does not match definition festival2.pwn(259) : warning 202: number of arguments does not match definition festival2.pwn(263) : error 029: invalid expression, assumed zero festival2.pwn(269) : warning 202: number of arguments does not match definition festival2.pwn(271) : warning 202: number of arguments does not match definition festival2.pwn(275) : error 029: invalid expression, assumed zero
pawn Код:
#define mainsmoke
#define othersmoke