Scripting Errors (need help)
#1

okay so im trying to set up moving gates/doors...i found this script online and downloaded it afet a few Loose indentations fixes i got these:
-------------------------------------------------------------------------------------------------------------------------------
C:\Users\Ryan Michael\Desktop\scriptfiles\SA-MP Server\gamemodes\gf.pwn(26384) : error 021: symbol already defined: "OnObjectMoved"

C:\Users\Ryan Michael\Desktop\scriptfiles\SA-MP Server\gamemodes\gf.pwn(2638 : warning 209: function "OnObjectMoved" should return a value

C:\Users\Ryan Michael\Desktop\scriptfiles\SA-MP Server\gamemodes\gf.pwn(26407) : error 021: symbol already defined: "OnPlayerPickUpPickup"

-------------------------------------------------------------------------------------------------------------------------------
any ideas here is the script for those lines + a few :

--------------------------------------------------------------------------------------------------------------------------------

}

public OnObjectMoved(objectid)
{
if(StopSound[objectid]) {
AllPlayerPlaySound(StopSound[objectid],StopSoundX[objectid],StopSoundY[objectid],StopSoundZ[objectid],objectid,0);
}
}

AllPlayerPlaySound(soundID,Float:X,Float:Y,Float:Z ,objectID,stopsound)
{
if(stopsound) StopSoundX[objectID] =X, StopSoundY[objectID] =Y, StopSoundZ[objectID] =Z, StopSound[objectID] = stopsound;
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i,soundID,X,Y,Z);
}
return 1;
}

IsKeyJustDown(key, newkeys, oldkeys)
{
if((newkeys & key) && !(oldkeys & key)) return 1;
return 0;
}

public OnPlayerPickUpPickup (playerid, pickupid)
{
if ( pickupid == cone[0] ) { //Door
MoveObject(Gate[3],2293.91,2490.96,2.36,2.00);
SetTimer("closeDoor",3000,false);
DestroyPickup(cone[0]);
return 1;
}
return 1;
}
--------------------------------------------------------------------------------------------------------------------------------
any help would be nice
Reply
#2

i think u are like the error says "redifining" check if u made 2

public OnObjectMoved(objectid)

public OnPlayerPickUpPickup (playerid, pickupid)
Reply


Forum Jump:


Users browsing this thread: