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

fix the error in this plugin please!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cs1.6
Senior Member
Join Date: Dec 2006
Old 02-26-2008 , 20:41   fix the error in this plugin please!
Reply With Quote #1

hi,

i have this plugin for a while now. I believe it was from this thread:

http://forums.alliedmods.net/showthread.php?t=2070


the plugin is attached to this post. And here is the error it gives:

Code:
L 02/27/2008 - 02:40:33: [CSTRIKE] Non-player entity 0 out of range
L 02/27/2008 - 02:40:33: [AMXX] Displaying debug trace (plugin "hostageai.amxx")

L 02/27/2008 - 02:40:33: [AMXX] Run time error 10: native error (native "cs_get_
hostage_foll")
L 02/27/2008 - 02:40:33: [AMXX]    [0] hostageai.sma::shoot (line 268)
L 02/27/2008 - 02:40:34: [CSTRIKE] Non-player entity 0 out of range
L 02/27/2008 - 02:40:34: [AMXX] Displaying debug trace (plugin "hostageai.amxx")

L 02/27/2008 - 02:40:34: [AMXX] Run time error 10: native error (native "cs_get_
hostage_foll")
L 02/27/2008 - 02:40:34: [AMXX]    [0] hostageai.sma::shoot (line 268)
L 02/27/2008 - 02:40:34: [CSTRIKE] Non-player entity 0 out of range
L 02/27/2008 - 02:40:34: [AMXX] Displaying debug trace (plugin "hostageai.amxx")

L 02/27/2008 - 02:40:34: [AMXX] Run time error 10: native error (native "cs_get_
hostage_foll")
L 02/27/2008 - 02:40:34: [AMXX]    [0] hostageai.sma::shoot (line 268)
Dropped bob_der_buergermeister from server
Attached Files
File Type: sma Get Plugin or Get Source (hostageai.sma - 770 views - 11.3 KB)
cs1.6 is offline
cs1.6
Senior Member
Join Date: Dec 2006
Old 03-25-2008 , 22:00   Re: fix the error in this plugin please!
Reply With Quote #2

It has been exactly a month now since i hoped for a fix for this error. I hope the error isn't that hard to get rid of! Or why no one dares to reply ..lol

thx and +karma for any help.
cs1.6 is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 03-25-2008 , 22:09   Re: fix the error in this plugin please!
Reply With Quote #3

this is a stab in the dark, but you may want to try changing this line ( line 368 )
Code:
if ( cs_get_hostage_foll ( hostageid[x] ) ) {
to
Code:
if ( hostageid[x]!=0 && cs_get_hostage_foll ( hostageid[x] ) ) {
__________________
hoboman is offline
hazard1337
Senior Member
Join Date: Sep 2006
Old 03-25-2008 , 22:10   Re: fix the error in this plugin please!
Reply With Quote #4

Are you using this on CZ?
__________________
[IMG]http://img139.**************/img139/1530/2sejaewg1.gif[/IMG]
If you +/- my K, leave your name.
I do not take requests VIA PM
Click on this before requesting/suggesting
This is your best friend
hazard1337 is offline
Send a message via Skype™ to hazard1337
cs1.6
Senior Member
Join Date: Dec 2006
Old 03-25-2008 , 22:26   Re: fix the error in this plugin please!
Reply With Quote #5

no i use cs

..really cool plugin. believe me.


hoboman , gonna try it out! thx. +karma


----------------

EDIT:

hoboman , i get this warning:


Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// hostageai.sma
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\scripting\hostageai.sm
a(211) : warning 217: loose indentation
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\scripting\hostageai.sm
a(218) : warning 217: loose indentation
// Header size:           1332 bytes
// Code size:            13704 bytes
// Data size:             6256 bytes
// Stack/heap size:      16384 bytes; max. usage is unknown, due to recursion
// Total requirements:   37676 bytes
//
// 2 Warnings.
// Done.
//
// Compilation Time: 1,8 sec
// ----------------------------------------

Press enter to exit ...

Last edited by cs1.6; 03-25-2008 at 22:32.
cs1.6 is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 03-25-2008 , 22:34   Re: fix the error in this plugin please!
Reply With Quote #6

that is not my fault...you didn't indent it correctly, but it really doesn't effect the plugin

you can completely ignore those warnings
__________________
hoboman is offline
cs1.6
Senior Member
Join Date: Dec 2006
Old 03-25-2008 , 22:52   Re: fix the error in this plugin please!
Reply With Quote #7

this is line 211:

Code:
public is_hostage_follow(id){if(is_hostage(id)){return (0<cs_get_hostage_foll(id)<=get_maxplayers());}return 0;}
and line 218:

Code:
}return 0;}
what do i have to change there?

wow..the error seems to be gone though! Good job!

Mind posting a full warning & error free sma of the plugin, if those lines 211/218 are not sufficient?

thx
cs1.6 is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 03-25-2008 , 23:49   Re: fix the error in this plugin please!
Reply With Quote #8

I am way too lazy to open up pawn studio to fix that...you just have to paste that code that I gave you exactly where the old one was and by that I mean where the old "if" started the new "if" should be...but saying that, those warning DON'T MEAN JACK AND THEY WILL NOT EFFECT YOUR PLUGIN
__________________
hoboman is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 03-26-2008 , 01:02   Re: fix the error in this plugin please!
Reply With Quote #9

Dam pawn studio freaks

If its a few tabs, eh But cs, you can figure that one out....

(I opened up studio once when it came out, and it just seems to confuse me more, I stick to EmEditor)

But yes, like hobo well explained, loose indentation = Nada for small shit like this
__________________
bmann_420 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-26-2008 , 01:03   Re: fix the error in this plugin please!
Reply With Quote #10

I'm rewritting this plugin a bit. ( better indentation, fakemeta, some minors optimizations, ... )
__________________
Arkshine is offline
Old 03-26-2008, 01:07
bmann_420
This message has been deleted by bmann_420. Reason: oops, wrong plugin
Reply



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 15:15.


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