SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 31/07/2011, 09:55 AM   #1
shahartal
Big Clucker
 
Join Date: Jul 2011
Location: sa-mp
Posts: 63
Reputation: 3
Question error|AttachObjectToVehicle

i create a neon that work on dini and i have problem with this code:

pawn Code:
#define MAX_NEONS 3
new ANeon[MAX_NEONS];

Quote:
ANeon[i] = CreateObject(18652,0,0,0,0,0,0);
AttachObjectToVehicle(ANeon[1],i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[2],i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[3],i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
the red is the line error

this is the error that i get:
Quote:
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5524) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5525) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5526) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5531) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5532) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5533) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(553 : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5539) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5540) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5544) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5545) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5546) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5550) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5551) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5552) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5556) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5557) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(555 : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5562) : warning 202: number of arguments does not match definition
C:\Users\user\Documents\GTA San Andreas User Files\xx\gamemodes\ActVgames.pwn(5563) : warning 202: number of arguments does not match definition
shahartal is offline  
Old 31/07/2011, 09:57 AM   #2
Toreno
Gangsta
 
Join Date: Nov 2010
Posts: 725
Reputation: 41
Default Re: error|AttachObjectToVehicle

You can't create an object then attach it this way, if you use variable to store these objects, try this.
pawn Code:
ANeon[0] = AttachObjectToVehicle(18652, i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18652, i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18652, i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
Toreno is offline  
Old 31/07/2011, 02:35 PM   #3
shahartal
Big Clucker
 
Join Date: Jul 2011
Location: sa-mp
Posts: 63
Reputation: 3
Default Re: error|AttachObjectToVehicle

STILL I HAVE THA SAME ERROR =\

this is the code:
Quote:
public OnPlayerConnect(playerid)
{

new vCount = CreateVehicle(411,0,0,0,0,0,0,-1);
DestroyVehicle(vCount);
for(new i = 1; i < vCount; i++)
{
if(dini_Exists(NeonFile(i)))
{
new NeonColor = dini_Int(NeonFile(i),"Color");
switch(NeonColor)
{
case 1:
{
ANeon[0] = AttachObjectToVehicle(18652, i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18652, i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18652, i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
}
case 2:
{
ANeon[0] = AttachObjectToVehicle(18648,i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18648,i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18648,i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
}
case 3:
{
ANeon[0] = AttachObjectToVehicle(18647,i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18647,i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18647,i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
}
case 4:
{
ANeon[0] = AttachObjectToVehicle(18649,i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18649,i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18649,i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
}
case 5:
{
ANeon[0] = AttachObjectToVehicle(18650,i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18650,i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18650,i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
}
case 6:
{
ANeon[0] = AttachObjectToVehicle(18651,i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18651,i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18651,i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
}
case 7:
{
ANeon[0] = AttachObjectToVehicle(18646,i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[1] = AttachObjectToVehicle(18646,i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
ANeon[2] = AttachObjectToVehicle(18646,i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
}
case 8:
{
ANeon[0] = AttachObjectToVehicle(18646,i, 0, -0.0, 0, 2.0, 2.0, 3.0);
}
case 9:
{
ANeon[0] = AttachObjectToVehicle(18646,i, 0.0, -1.5, -1, 2.0, 2.0, 3.0);
}
case 10:
{
ANeon[0] = AttachObjectToVehicle(18646,i, 0.0, 1.5, -0.6, 2.0, 2.0, 3.0);
}
}
}
}
shahartal is offline  
Old 31/07/2011, 03:02 PM   #4
MadeMan
High-roller
 
MadeMan's Avatar
 
Join Date: Jun 2007
Posts: 3,488
Reputation: 256
Default Re: error|AttachObjectToVehicle

pawn Code:
ANeon[0] = CreateObject(18652,0,0,0,0,0,0);
ANeon[1] = CreateObject(18652,0,0,0,0,0,0);
ANeon[2] = CreateObject(18652,0,0,0,0,0,0);
AttachObjectToVehicle(ANeon[0],i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[1],i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[2],i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
MadeMan is offline  
Old 31/07/2011, 04:03 PM   #5
shahartal
Big Clucker
 
Join Date: Jul 2011
Location: sa-mp
Posts: 63
Reputation: 3
Default Re: error|AttachObjectToVehicle

Quote:
Originally Posted by MadeMan View Post
pawn Code:
ANeon[0] = CreateObject(18652,0,0,0,0,0,0);
ANeon[1] = CreateObject(18652,0,0,0,0,0,0);
ANeon[2] = CreateObject(18652,0,0,0,0,0,0);
AttachObjectToVehicle(ANeon[0],i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[1],i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[2],i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
warning 202: number of arguments does to:
AttachObjectToVehicle(ANeon[0],i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[1],i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
AttachObjectToVehicle(ANeon[2],i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0,50);
shahartal is offline  
Old 31/07/2011, 04:14 PM   #6
MadeMan
High-roller
 
MadeMan's Avatar
 
Join Date: Jun 2007
Posts: 3,488
Reputation: 256
Default Re: error|AttachObjectToVehicle

pawn Code:
ANeon[0] = CreateObject(18652,0,0,0,0,0,0);
ANeon[1] = CreateObject(18652,0,0,0,0,0,0);
ANeon[2] = CreateObject(18652,0,0,0,0,0,0);
AttachObjectToVehicle(ANeon[0],i, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(ANeon[1],i, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(ANeon[2],i, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
MadeMan is offline  
Old 31/07/2011, 04:18 PM   #7
shahartal
Big Clucker
 
Join Date: Jul 2011
Location: sa-mp
Posts: 63
Reputation: 3
Default Re: error|AttachObjectToVehicle

king !
shahartal is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] AttachObjectToVehicle Wesley221 Tutorials 13 08/10/2015 04:40 PM
AttachObjectToVehicle help?? :( thimo Help Archive 5 01/01/2011 06:42 PM
[BUG]AttachObjectToVehicle Stefan_Toretto Help Archive 2 05/12/2010 06:28 PM
AttachObjectToVehicle? TroyBoy Help Archive 5 28/11/2010 08:00 PM


All times are GMT. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.