Raised This Month: $12 Target: $400
 3% 

[CS:GO]Tag mismatch (custom weapon allocator)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
enghausen
Junior Member
Join Date: Dec 2018
Old 12-11-2021 , 10:08   [CS:GO]Tag mismatch (custom weapon allocator)
Reply With Quote #1

Hi!

I am playing around with SourcePawn just to get an idea how to make plugins.

I ran into this "Tag mismatch" when making some small changes to a weapon allocator for the splewis retake plugin.

Seems like the mismatch occurs when using this function from the generic.sp in the retakes code.

Source (line 122): https://github.com/splewis/csgo-reta...kes/generic.sp

Code:
/**
 * Adds an integer to a menu as a string choice.
 */
stock void AddMenuInt(Menu menu, int value, const char[] display) {
    char buffer[INTEGER_STRING_LENGTH];
    IntToString(value, buffer, sizeof(buffer));
    menu.AddItem(buffer, display);
}
Trying to use it with this call:

Code:
public void GivePistolRMenuCT(int client) {
    Handle menu = CreateMenu(MenuHandler_PISTOLR_CT);
    SetMenuTitle(menu, "Select a CT pistol round pistol:");
    AddMenuInt(menu, pistol_choice_ct_hkp2000, "P2000");
Source (line 842): https://github.com/tmercswims/csgo-r...rdallocator.sp

Plugin seems to work, but I am really curious about the "tag mismatch"? :-)
enghausen is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-11-2021 , 17:34   Re: [CS:GO]Tag mismatch (custom weapon allocator)
Reply With Quote #2

try this

PHP Code:
public void GivePistolRMenuCT(int client) {
    
Menu menu CreateMenu(MenuHandler_PISTOLR_CT);
    
SetMenuTitle(menu"Select a CT pistol round pistol:");
    
AddMenuInt(menupistol_choice_ct_hkp2000"P2000"); 
__________________
8guawong is offline
enghausen
Junior Member
Join Date: Dec 2018
Old 12-13-2021 , 06:57   Re: [CS:GO]Tag mismatch (custom weapon allocator)
Reply With Quote #3

Quote:
Originally Posted by 8guawong View Post
try this

PHP Code:
public void GivePistolRMenuCT(int client) {
    
Menu menu CreateMenu(MenuHandler_PISTOLR_CT);
    
SetMenuTitle(menu"Select a CT pistol round pistol:");
    
AddMenuInt(menupistol_choice_ct_hkp2000"P2000"); 
Thansk a lot 8guawong! Thats was just spot on!

Have a great day!
enghausen is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode