Raised This Month: $ Target: $400
 0% 

Problem passing info


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xtcp
Junior Member
Join Date: Jun 2006
Old 06-12-2009 , 00:31   Problem passing info
Reply With Quote #1

Code:
public plugin_init()
{
    register_srvcmd("eplay_select", "cmdSelMenu", -1, "<gid> - displays select menu")
    register_menucmd(register_menuid("select menu"), 1023, "actionSelMenu")
}


public cmdSelMenu(id, level, cid)
{
    new gid[192], steamid[33], victim

    read_argv(1, steamid, 32)

    read_args(gid, 191)

    remove_quotes(gid)

    parse(gid, steamid, 32)

    victim = cmd_target(id, steamid)
        
        if (!victim)
            return PLUGIN_HANDLED

    display_selectmenu(victim, g_menuposition[id] = 0, gid)

    return PLUGIN_HANDLED
}



display_selectmenu(id, pos, gid) 
{
    if(pos < 0)  
        return
        
    new gidx = gid

            log_message("GID: ^"%s - %s^"", gidx, gid)
      new start = pos * 8
      if(start >= 10)
            start = pos = g_menuposition[id]

      new end = start + 8
    if(end > 10)
            end = 10
    
    static menubody[512]    
      new len = format(menubody, 511, "\wEscolhe um jogador para a tua equipa^n^n")

    new b = 0
    new keys = MENU_KEY_0

    new Sql:dbc
      dbc = init_sql()
    if (dbc == SQL_FAILED) {
    client_print(id,print_chat,"error.")    
    return
    }

    new Result:result
    new cnd = 0
    new auth[32]

    result = dbi_query(dbc,"SELECT auth FROM `players` WHERE `gid` = '%s' AND `don` = '0'", gidx)

     while(dbi_nextrow(result)>0)
    {

        dbi_result(result,"auth",auth, 31)
         len += format(menubody[len], 511 - len, "%i: %s\w^n", b, auth)
        g_menuplayers[id][cnd] = auth[31]
        keys |= (1<<b)
        ++cnd
        ++b
    }
    dbi_free_result(result)
    dbi_close(dbc)


/*
      if(end != cnd) 
      {
            format(menubody[len], 511 - len, "^n9. %s...^n0. %s", "More", pos ? "Back" : "Exit")
            keys |= MENU_KEY_9
      }
      else
        format(menubody[len], 511-len, "^n0. %s", pos ? "Back" : "Exit")
    */

      show_menu(id, keys, menubody, -1, "select menu")
}
I get the error 035 argument type mismatch, how can I pass that gid to the other function?

Thank you in advance
xtcp is offline
 



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 14:01.


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