Raised This Month: $ Target: $400
 0% 

Server crash on command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 05-09-2010 , 16:08   Server crash on command
Reply With Quote #1

Hey, why the hell my server is always crashing after i type: /shop

/shop opens up ShopMenu

here is my whole plugin:

http://pastebin.com/8rSCryFv

and if you are lazy to look up it all, just look here:

PHP Code:
public ShopMenu(id) {
    if (
PlayerCon[id]) {
        new 
title[100], m1[100], m2[100], m3[100], m4[100], m5[100]
        
format(title,99,"\wJusu taskai: \w%i"PlayerXP[id])
        if (!
PlayerDamage[id]){
        
format(m1,99,"\wZalos rodymas (Kaina: \w%i\w)"get_pcvar_num(ShopDamage))
        }else{
        
format(m1,99,"\dZalos rodymas\w *"get_pcvar_num(ShopDamage))
        } if(!
PlayerAwp[id]){
        
format(m2,99,"\wAwp naudojimas (Kaina: %i)"get_pcvar_num(ShopAwp))
        }else{
        
format(m2,99,"\wAwp naudojimas\w *"get_pcvar_num(ShopAwp))
        } if(!
PlayerPap[id]){
        
format(m3,99,"\wPapildomi bonusai (Kaina: \w%i\w)"get_pcvar_num(ShopPap))
        }else{
        
format(m3,99,"\wPapildomi bonusai\w *"get_pcvar_num(ShopPap))
        } if(!
PlayerKar[id]){
        
format(m4,99,"\wKario komplektas (Kaina: \w%i\w)"get_pcvar_num(ShopKar))
        }else{
        
format(m4,99,"\wKario komplektas\w *"get_pcvar_num(ShopKar))
        } if (!
PlayerSlot[id]){
        
format(m5,99,"\wSlotas serveryje (Kaina: \w%i\w)"get_pcvar_num(ShopSlot))
        }else{
        
format(m5,99,"\wSlotas serveryje\w *"get_pcvar_num(ShopSlot))
        }
        new 
menu menu_create(title"ShopMenuHandler")
        
menu_additem(menum1"2"0)
        
menu_additem(menum2"3",0)
        
menu_additem(menum3"4",0)
        
menu_additem(menum4"5",0)
        
menu_additem(menum5"6",0)
        
menu_setprop(menuMPROP_EXITMEXIT_ALL)
        
menu_display(idmenu0)
        }else{
        
client_print(idprint_chat,"!g[User Shop]!y Tik registruoti zaidejai gali naudotis menu.")
    }
    return 
PLUGIN_HANDLED
}

public 
ShopMenuHandler(idmenuitem) {
    if( 
item == MENU_EXIT ) {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64]
    new 
accesscallback
    
    menu_item_getinfo
(menuitemaccessdata,5iName63callback)
    
    new 
key str_to_num(data)
    
    switch(
key) {
        case 
1: {
            
ShopMenu(id)
        }
        case 
2: {
            if (!
PlayerDamage[id]){
            
BuyDamage(id)
            }else{
            
ShopMenu(id)
        }
        }
        case 
3:  {
            if (!
PlayerAwp[id]){
            
BuyAwp(id)
            }else{
            
ShopMenu(id)
        }
        }
        case 
4:  {
            if (!
PlayerPap[id]){
            
BuyPap(id)
            }else{
            
ShopMenu(id)
        }
        }
        case 
5: {
            if (!
PlayerKar[id]){
            
BuyKar(id)
            }else{
            
ShopMenu(id)
        }
        }
        case 
6: {
            if (!
PlayerSlot[id]){
            
BuySlot(id)
            }else{
            
ShopMenu(id)
        }
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

Help please, someone ?

EDIT: here is message after crash in my server console:


Quote:
./hlds_run: line 321: 18326 Segmentation fault $HL_CMD
what it means ?

Last edited by reinert; 05-09-2010 at 16:55.
reinert 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 03:42.


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