View Single Post
Author Message
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-15-2010 , 04:09   How is this a tag mismatch?
Reply With Quote #1

Code:
/**
 * List of available sdktools functions.
 */
enum SDKLibCalls
{
    #if defined PROJECT_GAME_CSS
    SDKLibCall_TerminateRound,      /** Terminate the round with a given reason. */
    SDKLibCall_CSWeaponDrop,        /** Force client to drop weapon. */
    SDKLibCall_FlashlightIsOn,      /** Check is a client's flashlight is on. */
    SDKLibCall_FlashlightTurnOn,    /** Turn a client's flashlight on. */
    SDKLibCall_FlashlightTurnOff,   /** Turn a client's flashlight off. */
    #endif
}

/**
 * Handles to all the pre-defined sdkcalls.
 */
new Handle:g_hSDKCall[SDKLibCalls];

/**
 * Terminates the round. (CS:S)
 * 
 * @param delay     Time to wait before new round starts.
 * @param reason    Round end reason.  See enum RoundEndReasons.
 */
stock SDKToolsLib_TerminateRound(Float:delay, RoundEndReasons:reason)
{
    SDKCall(g_hSDKCall[SDKLibCall_TerminateRound], delay, _:reason);
}

/**
 * Forces client to drop a weapon. (CS:S)
 * 
 * @param client    The client index.
 * @param weapon    The weapon entity index to force client to drop.
 */
stock SDKToolsLib_CSWeaponDrop(client, weapon)
{
    SDKCall(g_hSDKCall[SDKLibCall_CSWeaponDrop], client, weapon, true, false);
}

g_hSDKCall is defined as type Handle, yet the first parameter of SDKCall is saying it's not.

I verified it is this parameter because if I put "Handle:" in front of g_hSDKCall then the warning goes away. But I don't think there should be a warning at all?
__________________
Greyscale is offline