undefined symbol
#1

code

Код:
 CMD:destroyvehicleobjects(playerid, params[])
{

     DestroyDynamicObject(danodano1);
     DestroyDynamicObject(danodano);
     DestroyDynamicObject(neon);
     DestroyDynamicObject(neon1);
     DestroyDynamicObject(neon2);
     DestroyDynamicObject(neon3);
     DestroyDynamicObject(neon4);
     DestroyDynamicObject(neon5);
     DestroyDynamicObject(neon6);
     DestroyDynamicObject(neon7);
     DestroyDynamicObject(neon8);
     DestroyDynamicObject(neon9);
     DestroyDynamicObject(neon10);
     DestroyDynamicObject(neon11);
     DestroyDynamicObject(neon12);
     DestroyDynamicObject(neon13);
     DestroyDynamicObject(interior1);
     DestroyDynamicObject(interior2);
     DestroyDynamicObject(back);
     DestroyDynamicObject(back2);
     DestroyDynamicObject(front);
     DestroyDynamicObject(front2);
     DestroyDynamicObject(undercover);
     DestroyDynamicObject(undercover1);
}
i have the neon13 defined (createobject etc)

but when i compile i get undefined symbol (objectname)

how to fix
Reply
#2

Where is neon13 defined? It should be a global variable.
Reply
#3

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
Where is neon13 defined? It should be a global variable.
in a dialog
Код:
if(listitem == 6)
		{
			//police
			SetPVarInt(playerid, "Status", 1);
			SetPVarInt(playerid, "neon12", CreateDynamicObject(18646,0,0,0,0,0,0));
			SetPVarInt(playerid, "neon13", CreateDynamicObject(18646,0,0,0,0,0,0));
			AttachObjectToVehicle(GetPVarInt(playerid, "neon12"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			AttachObjectToVehicle(GetPVarInt(playerid, "neon13"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
		}
Reply
#4

That is setting a PVarInt, not defining a new variable...
You should have something like:
pawn Код:
new neon13;
Reply
#5

Quote:
Originally Posted by GSRP
Посмотреть сообщение
That is setting a PVarInt, not defining a new variable...
You should have something like:
pawn Код:
new neon13;
Instead of making him rewrite all his code because you don't understand PVars(Per-Player variable system), just use mine I posted below.

pawn Код:
CMD:destroyvehicleobjects(playerid, params[])
{
    DestroyDynamicObject(GetPVarInt(playerid, danodano1));
    DestroyDynamicObject(GetPVarInt(playerid, danodano));
    DestroyDynamicObject(GetPVarInt(playerid, neon));
    DestroyDynamicObject(GetPVarInt(playerid, neon1));
    DestroyDynamicObject(GetPVarInt(playerid, neon2));
    DestroyDynamicObject(GetPVarInt(playerid, neon3));
    DestroyDynamicObject(GetPVarInt(playerid, neon4));
    DestroyDynamicObject(GetPVarInt(playerid, neon5));
    DestroyDynamicObject(GetPVarInt(playerid, neon6));
    DestroyDynamicObject(GetPVarInt(playerid, neon7));
    DestroyDynamicObject(GetPVarInt(playerid, neon8));
    DestroyDynamicObject(GetPVarInt(playerid, neon9));
    DestroyDynamicObject(GetPVarInt(playerid, neon10));
    DestroyDynamicObject(GetPVarInt(playerid, neon11));
    DestroyDynamicObject(GetPVarInt(playerid, neon12));
    DestroyDynamicObject(GetPVarInt(playerid, neon13));
    DestroyDynamicObject(GetPVarInt(playerid, interior1));
    DestroyDynamicObject(GetPVarInt(playerid, interior2));
    DestroyDynamicObject(GetPVarInt(playerid, back));
    DestroyDynamicObject(GetPVarInt(playerid, back2));
    DestroyDynamicObject(GetPVarInt(playerid, front));
    DestroyDynamicObject(GetPVarInt(playerid, front2));
    DestroyDynamicObject(GetPVarInt(playerid, undercover));
    DestroyDynamicObject(GetPVarInt(playerid, undercover1));
}
Reply
#6

Do you have the correct includes that come with 0.3d for that feature?
Reply
#7

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Instead of making him rewrite all his code because you don't understand PVars(Per-Player variable system), just use mine I posted below.

pawn Код:
CMD:destroyvehicleobjects(playerid, params[])
{
    DestroyDynamicObject(GetPVarInt(playerid, danodano1));
    DestroyDynamicObject(GetPVarInt(playerid, danodano));
    DestroyDynamicObject(GetPVarInt(playerid, neon));
    DestroyDynamicObject(GetPVarInt(playerid, neon1));
    DestroyDynamicObject(GetPVarInt(playerid, neon2));
    DestroyDynamicObject(GetPVarInt(playerid, neon3));
    DestroyDynamicObject(GetPVarInt(playerid, neon4));
    DestroyDynamicObject(GetPVarInt(playerid, neon5));
    DestroyDynamicObject(GetPVarInt(playerid, neon6));
    DestroyDynamicObject(GetPVarInt(playerid, neon7));
    DestroyDynamicObject(GetPVarInt(playerid, neon8));
    DestroyDynamicObject(GetPVarInt(playerid, neon9));
    DestroyDynamicObject(GetPVarInt(playerid, neon10));
    DestroyDynamicObject(GetPVarInt(playerid, neon11));
    DestroyDynamicObject(GetPVarInt(playerid, neon12));
    DestroyDynamicObject(GetPVarInt(playerid, neon13));
    DestroyDynamicObject(GetPVarInt(playerid, interior1));
    DestroyDynamicObject(GetPVarInt(playerid, interior2));
    DestroyDynamicObject(GetPVarInt(playerid, back));
    DestroyDynamicObject(GetPVarInt(playerid, back2));
    DestroyDynamicObject(GetPVarInt(playerid, front));
    DestroyDynamicObject(GetPVarInt(playerid, front2));
    DestroyDynamicObject(GetPVarInt(playerid, undercover));
    DestroyDynamicObject(GetPVarInt(playerid, undercover1));
}
still

i get undefined synbol
Reply
#8

I messed up on that. My bad. This code should work.

pawn Код:
CMD:destroyvehicleobjects(playerid, params[])
{
    DestroyDynamicObject(GetPVarInt(playerid, "danodano1"));
    DestroyDynamicObject(GetPVarInt(playerid, "danodano"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon1"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon2"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon3"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon4"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon5"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon6"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon7"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon8"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon9"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon10"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon11"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon12"));
    DestroyDynamicObject(GetPVarInt(playerid, "neon13"));
    DestroyDynamicObject(GetPVarInt(playerid, "interior1"));
    DestroyDynamicObject(GetPVarInt(playerid, "interior2"));
    DestroyDynamicObject(GetPVarInt(playerid, "back"));
    DestroyDynamicObject(GetPVarInt(playerid, "back2"));
    DestroyDynamicObject(GetPVarInt(playerid, "front"));
    DestroyDynamicObject(GetPVarInt(playerid, "front2"));
    DestroyDynamicObject(GetPVarInt(playerid, "undercover"));
    DestroyDynamicObject(GetPVarInt(playerid, "undercover1"));
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)