error|AttachObjectToVehicle
#1

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

pawn Код:
#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

Reply
#2

You can't create an object then attach it this way, if you use variable to store these objects, try this.
pawn Код:
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);
Reply
#3

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);
}
}
}
}

Reply
#4

pawn Код:
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);
Reply
#5

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
pawn Код:
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);
Reply
#6

pawn Код:
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);
Reply
#7

king !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)