AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   A little problem with HarbuRPAlpha (https://forums.alliedmods.net/showthread.php?t=48880)

zukku 12-22-2006 13:14

A little problem with HarbuRPAlpha
 
1 Attachment(s)
First of all. I run a TSRP ( The Specialists RolePlay ) server, running the map mecklenburgV5_A5, running Harbu's roleplay plugins ( Modified by Smokey ).
My server is running fine BUT, when people try robbing the Diner or the Bank they arent getting any money, and they arent glowing blue, red or w/e.
(711/Wawa is fine, no problems there.)
This is a print of the console, what i am getting when people are robbing.

- 00:59:14: [ENGINE] Invalid player 0 (not in-game)
- 00:59:14: [AMXX] Displaying debug trace (plugin "HarbuRPAlpha.amxx")
- 00:59:14: [AMXX] Run time error 10: native error (native "force_use")
- 00:59:14: [AMXX] [0] HarbuRPAlpha.sma:: robbingstartdinerstart (line 3933)
- 00:59:14: [AMXX] [1] HarbuRPAlpha.sma::robdiner (line 3915)
- 00:59:14: [AMXX] [2] HarbuRPAlpha.sma::rob (line 3643)
- 00:59:14: [AMXX] [3] HarbuRPAlpha.sma::shop_options_actions (line 5340)

I hope someone can help me out here. I've also attached my HarbuRPAlpha.sma.

Oh, and this is the HarbuRPAlpha.sma from [HarbuModV1+Smokey'sModifications+SkillsMOd ETC]
(I've had my server for a long time and havent seen something as this in a long time, there were alot of great stuff in that. Smokey saved me alot of time, Thanks Smokey (: )

zukku 12-24-2006 07:44

Re: A little problem with HarbuRPAlpha
 
(Sorry for double posting)

Does anybody got a clue?.. No?

The Specialist 12-24-2006 07:49

Re: A little problem with HarbuRPAlpha
 
There are common problems when the player isnt in game , maybee try a is_user_alive(id) check . :|

zukku 12-24-2006 08:55

Re: A little problem with HarbuRPAlpha
 
I'll do, Thanks.


EDIT: Hmmm, can't seem to find anyone missing. Here is the part of the sma. were its suppost to give the robber money ( What it is not ) I am not sure this is were the failure is.. But maybe you guys could point it out.
Code:
///////////////////////////////////////////////// // Transferring Money from robberies to player //////////////////////////////////////////////// public robaction(id,wallet) {     new origin[3], authid[32], query[256]     get_user_origin(id,origin)     get_user_authid(id,authid,31)     if(whorob711 == id && is_user_alive(id) == 1)     {         // If robber moves too far from register         if(!allowed_npc_distance(id,get_cvar_num("rp_npcid_market")))         {             robbing711naturalend(id)             client_print(id,print_chat,"[RobMOD] You've moved too far from the register, now RUN!^n")         }         // If wallet is full         if((wallet + get_cvar_num( "rp_711_amount" )) > get_cvar_num("rp_walletlimit"))         {             robbing711naturalend(id)             client_print(id,print_chat,"[RobMOD] Your wallet has no more room for more money, now hurry to an atm machine!^n")         }         // Pay the rob         else         {             format( query, 255, "UPDATE money SET wallet=wallet+%i WHERE steamid='%s'", get_cvar_num( "rp_711_amount" ), authid)             dbi_query( dbc, "%s",query)             rob711currentcash -= get_cvar_num( "rp_711_amount" )             robgain711 += get_cvar_num( "rp_711_amount" )         }         if(rob711currentcash <= 0)         {             robbing711naturalend(id)             client_print(id,print_chat,"[RobMOD] You have cleared the register. Now run like hell!^n")         }     }     if(whorobdiner == id && is_user_alive(id) == 1)     {         // If robber moves too far from register         if(!allowed_npc_distance(id,get_cvar_num("rp_npcid_diner")))         {             robbingdinernaturalend(id)             client_print(id,print_chat,"[RobMOD] You've moved too far from the register, now RUN!^n")         }         // If wallet is full         if((wallet + get_cvar_num( "rp_diner_amount" )) > get_cvar_num("rp_walletlimit"))         {             robbingdinernaturalend(id)             client_print(id,print_chat,"[RobMOD] Your wallet has no more room for more money, now hurry to an atm machine!^n")         }         // Pay the rob         else         {             format( query, 255, "UPDATE money SET wallet=wallet+%i WHERE steamid='%s'", get_cvar_num( "rp_diner_amount" ), authid)             dbi_query( dbc, "%s",query)             robdinercurrentcash -= get_cvar_num( "rp_diner_amount" )             robgaindiner += get_cvar_num( "rp_diner_amount" )         }         if(robdinercurrentcash <= 0)         {             robbingdinernaturalend(id)             client_print(id,print_chat,"[RobMOD] You have cleared the register. Now run like hell!^n")         }     }     if(whorobbank == id && is_user_alive(id) == 1)     {         if(!allowed_npc_distance(id,get_cvar_num("rp_npcid_bankone")))         {             robbingbanknaturalend(id)             client_print(id,print_chat,"[RobMOD] You've moved too far from the bank employee, now RUN!^n")         }         if((wallet + get_cvar_num("rp_moneybag_value")) > get_cvar_num("rp_walletlimit"))         {             robbingbanknaturalend(id)             client_print(id,print_chat,"[RobMOD] Your wallet has no more room for money, now hurry and deposit your money!")         }                         else         {             format( query, 255, "UPDATE money SET balance=balance+%i WHERE steamid='%s'", get_cvar_num("rp_bank_amount"), authid)             dbi_query(dbc,"%s",query)             robbankcurrentcash -= get_cvar_num("rp_bank_amount")         }         if(robbankcurrentcash <= 0)         {             robbingbanknaturalend(id)             client_print(id,print_chat,"[RobMOD] You have emptied the banks money! Now RUN FOR YOUR LIFE!^n")         }     }     /*     if(whorobbank == id && is_user_alive(id) == 1)     {         new Float:fbagorigin[3], Float:fbagorigin2[3]         new bagorigin[3], bagorigin2[3]         entity_get_vector(moneybag,EV_VEC_origin,fbagorigin)         entity_get_vector(moneybag2,EV_VEC_origin,fbagorigin2)                 bagorigin[0] = floatround(fbagorigin[0])         bagorigin[1] = floatround(fbagorigin[1])         bagorigin[2] = floatround(fbagorigin[2])         bagorigin2[0] = floatround(fbagorigin2[0])         bagorigin2[1] = floatround(fbagorigin2[1])         bagorigin2[2] = floatround(fbagorigin2[2])         if(get_distance(bagorigin,positionchurch) <= 250.0)         {             entity_set_origin(moneybag,nullorigin)             client_print(id,print_chat,"[RobMod] Moneybag arrived at target! %i added to your balance!^n",get_cvar_num("rp_moneybag_value"))             format( query, 255, "UPDATE money SET balance=balance+%i WHERE steamid='%s'", get_cvar_num("rp_moneybag_value"), authid)             dbi_query(dbc,"%s",query)             nrobags += 1         }         if(get_distance(bagorigin2,positionchurch) <= 200.0)         {             entity_set_origin(moneybag2,nullorigin)             client_print(id,print_chat,"[RobMod] Moneybag arrived at target! %i added to your balance!^n",get_cvar_num("rp_moneybag_value"))             format( query, 255, "UPDATE money SET balance=balance+%i WHERE steamid='%s'", get_cvar_num("rp_moneybag_value"), authid)             dbi_query(dbc,"%s",query)             nrobags += 1         }     }     */     return PLUGIN_HANDLED }

The Specialist 12-24-2006 09:19

Re: A little problem with HarbuRPAlpha
 
the error says "line 3933" "line 3915" "lin e 3643" "line 5340" . Look at those lines and see what the problem is . I would but this code is way to large to take the time .

zukku 12-24-2006 09:22

Re: A little problem with HarbuRPAlpha
 
Well, i looked at the lines and couldent find anything wrong. I will post the lines in a min.

EDIT:



Code:
-line 3933 format( query, 255, "UPDATE money SET balance=balance+%i WHERE steamid='%s'",salaryf,authid) -line 3915 result = dbi_query( dbc,"%s", query) -line 3643     pageitems[id] = 0 -line 5340                     jailaction(entid,MAPUSE)
As you may see... It dosent have anything to do with the robbing.. Not what i can see at least.
( Just for saying, i dont have much knowledge with codeing. And please correct me if i am wrong somewere. )

The Specialist 12-24-2006 09:29

Re: A little problem with HarbuRPAlpha
 
what version of amxmodx are you running ? and when did this start to happen ? I have a feeling it's an outdated amxmodx problem. Alot of times when plugins are released lets say around ver 1.21a , and now are being used at ver 1.76c . The entire structure is changed , functions are moved , bugs are fixed. And one fuunction that was good , now goes "bad". So it would take a porting to the new version.

zukku 12-24-2006 09:42

Re: A little problem with HarbuRPAlpha
 
I see what you mean... Well, i am running amxmodx 1.75.
And the problem.. Its been there since i began using this harburpalpha file..

Neverless, i will try downloading the new version of Amxmodx. I will replie back when i've done it.

The Specialist 12-24-2006 09:52

Re: A little problem with HarbuRPAlpha
 
well thats not what I'm saying . How long ago was this plugin made ? If the author hasn't updated the plugin since 1.50 , and your using 1.75 , there Will be some errors . So the plugin itself has to be updated (Although as a beta tester I recommend updating for the hell of it ):wink:

zukku 12-24-2006 09:55

Re: A little problem with HarbuRPAlpha
 
Well, its Smokey's so, i guess he has the same version as i got. He wrote It works on 1.75a..

EDIT: Since he released it, not so long ago.


All times are GMT -4. The time now is 22:25.

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