stock Detector_Delete(id) { if (id != -1 && MetalDetectors[id][detectorExists]) { new query[64]; DestroyDynamicObject(MetalDetectors[id][detectorObject][0]); DestroyDynamicObject(MetalDetectors[id][detectorObject][1]); format(query, sizeof(query), "DELETE FROM `detectors` WHERE `detectorID` = '%d'", MetalDetectors[id][detectorID]); mysql_tquery(g_iHandle, query); MetalDetectors[id][detectorID] = 0; MetalDetectors[id][detectorExists] = 0; } return 1; }
if (id != -1 && MetalDetectors[id][detectorExists])
C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3921) : error 001: expected token: ")", but found "[" C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3921) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3921) : warning 215: expression has no effect C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3921) : error 001: expected token: ";", but found "]" C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3921) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
new MetalDetectors[MAX_METAL_DETECTORS][dectectorData];
C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(1574) : error 017: undefined symbol "dectectorData" C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(1574) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3924) : error 001: expected token: ",", but found "[" C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3924) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3924) : warning 215: expression has no effect C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3924) : error 001: expected token: ";", but found "]" C:\Users\User\Desktop\SLS-RP\gamemodes\LSL-RP.pwn(3924) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors. |
stock Detector_Delete(id) { if (id != -1 && MetalDetectors[id][detectorExists]) { new query[64]; DestroyDynamicObject(MetalDetectors[id][detectorObject][0]); DestroyDynamicObject(MetalDetectors[id][detectorObject][1]); format(query, sizeof(query), "DELETE FROM `detectors` WHERE `detectorID` = '%d'", MetalDetectors[id][detectorID]); mysql_tquery(g_iHandle, query); MetalDetectors[id][detectorID] = 0; MetalDetectors[id][detectorExists] = 0; } return 1; } |
new MetalDectors[MAX_METAL_DETECTORS][detectorData]; //
DestroyDynamicObject(MetalDectors[id][detectorObject][0]);
stock Detector_Delete(id) { if (id != -1 && MetalDectors[id][detectorExists]) { new query[64]; DestroyDynamicObject(MetalDectors[id][detectorObject][0]); DestroyDynamicObject(MetalDectors[id][detectorObject][1]); format(query, sizeof(query), "DELETE FROM `detectors` WHERE `detectorID` = '%d'", MetalDectors[id][detectorID]); mysql_tquery(g_iHandle, query); MetalDectors[id][detectorID] = 0; MetalDectors[id][detectorExists] = 0; } return 1; }
enum detectorData { detectorID, detectorExists, Float:detectorPos[4], detectorInterior, detectorWorld, detectorObject[2] }; new MetalDectors[MAX_METAL_DETECTORS][detectorData]
DestroyDynamicObject(MetalDectors[id][detectorObject[0]]); DestroyDynamicObject(MetalDectors[id][detectorObject[1]]);
DestroyDynamicObject(MetalDectors[id][detectorObject[0]]); |
DestroyDynamicObject(MetalDectors[id][detectorObject][0]); DestroyDynamicObject(MetalDectors[id][detectorObject][1]);