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

[Fixed] Run time error 10 in heros


  
 
 
Thread Tools Display Modes
adversary*D
Member
Join Date: Aug 2004
Location: neverland ranch
Old 08-29-2004 , 08:05  
#21

k thanks
adversary*D is offline
Send a message via AIM to adversary*D Send a message via MSN to adversary*D Send a message via Yahoo to adversary*D
imported_Phiber
Senior Member
Join Date: Jul 2004
Location: Sweden
Old 09-12-2004 , 08:56  
#22

I get a runtime error 10 in rouge.amx and the fix posted here doesnt work, i get this:


[AMX] Run time error 10 on line 153 (task "0") (plugin "sh_rogue.amx")

Line 153 in the sma is this: if ( get_user_noclip(id) == 1)

I get this error every second in my server console...
imported_Phiber is offline
Send a message via MSN to imported_Phiber Send a message via Yahoo to imported_Phiber
Prowler
Senior Member
Join Date: Nov 2004
Old 09-12-2004 , 10:58  
#23

i get the same thing on one of my new heros im making, im just assuming its because i have set to tasks to start at the same time that both affect the player in the same manner (visibility) not sure if that has anything to do with it, but you never know
Prowler is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-12-2004 , 11:46  
#24

doubt it... your doing something wrong most likely

Quote:
10 - AMX_ERR_NATIVE This means an error has occurred inside a native function provided by Admin Mod. Usually this is because you have passed it invalid values in its arguments. There is one known way to generate this error when your arguments are valid; call the readfile() function and attempt to read a line that is too long for the buffer you are providing to receive it.
or not doing enough checking. make sure the user is still connected and avlive if they need to be alive... etc...
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
imported_Phiber
Senior Member
Join Date: Jul 2004
Location: Sweden
Old 09-12-2004 , 16:22  
#25

jtp10181:

Can you post a fix for my problem? As the non scripting noob i am
it would be great becuse i cant check if i get any other errors on my server becuse i get spammed with the rouge error....

And dont tell me to remove it becuse i wanna keep it...

Thx!
imported_Phiber is offline
Send a message via MSN to imported_Phiber Send a message via Yahoo to imported_Phiber
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-12-2004 , 17:09  
#26

right before
Code:
if ( get_user_noclip(id) == 1)
try adding

Code:
if ( !is_user_alive(id) || !is_user_connected(id)) return PLUGIN_CONTINUE
that will esentially stop the function its in if that userindex is not alive or is not connected. I don't know what the rest of the code looks like so if that wont work then please give me a link to where you downloaded the hero (yes I'm lazy).
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
imported_Phiber
Senior Member
Join Date: Jul 2004
Location: Sweden
Old 09-12-2004 , 17:50  
#27

Code:
public rogue_endnoclip(id)
{
  g_rogueTimer[id]=0
  if ( !is_user_alive(id) || !is_user_connected(id)) return PLUGIN_CONTINUE
  if ( get_user_noclip(id) == 1)
  {
    // Turn off no-clipping and make sure the user has moved in 1/4 second
    g_rogueTimer[id]=-1
    set_user_noclip(id,0)
    if ( is_user_alive(id) ) positionChangeTimer(id, 0.1 )
  }
}
After i added like that i get this error when compiling:
sh_rouge.sma(161) : warning 209: function "rouge_endnoclip" should return a value

But it works no no more error thx alot jtp10181
here is they link anyway http://shero.rocks-hideout.com/forum...oad.php?id=157
imported_Phiber is offline
Send a message via MSN to imported_Phiber Send a message via Yahoo to imported_Phiber
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-12-2004 , 18:12  
#28

change the "return PLUGIN_CONTINUE" to just "return" and the compile error will go away.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
imported_Phiber
Senior Member
Join Date: Jul 2004
Location: Sweden
Old 09-13-2004 , 09:43  
#29

Thx alot jtp10181 it works now
imported_Phiber is offline
Send a message via MSN to imported_Phiber Send a message via Yahoo to imported_Phiber
grandpa_smurf
Member
Join Date: Aug 2004
Location: New Zealand
Old 09-21-2004 , 07:16  
#30

hey jtp
i actually kinda dont get what ur tryin to say: i tried removing PLUGIN CONTINTUE from this
Code:
public vash_damage(id)
{
    if (!shModActive()) return PLUGIN_CONTINUE
hope that was rite ( compiled it and put it in the plugins folder to - just 4 u guyz who would ask tht question) and i still get this error:
[AMX] Run time error 10 on line 85 (plugin "sh_vash.amx")

can u tell me which line i should add & where like u told phiber

and also for these heros if possible - morpheus,billy,grimreaper,greenarrow << there is 1 more hero which i cant remeber ; i will edit this post n put it up later
------------------------------------------------------------------------------
jtp10181 wrote:
Quote:
find the line number of the error, thats the event you nedd to add the check to
what do u mean by that

thanks
ps: soz this is a real nooby question but i'm new & learning
grandpa_smurf is offline
Send a message via MSN to grandpa_smurf Send a message via Yahoo to grandpa_smurf
 



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


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