Raised This Month: $ Target: $400
 0% 

Weird errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 11-20-2012 , 08:42   Weird errors
Reply With Quote #1

Hello, i came across some errors that i find weird and i don't know how to fix.
They are not compilation errors but rather maybe some logic errors.

1.
Spoiler


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

2.
Spoiler


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

3.
Spoiler


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

Any help with any of those errors would be highly appreciated...
__________________

Last edited by n0br41ner; 11-21-2012 at 03:54.
n0br41ner is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 11-20-2012 , 10:57   Re: Weird errors
Reply With Quote #2

For 1, give_item already returns the entity ID so it's useless to use find_ent_by_owner. Try changing it
Backstabnoob is offline
Old 11-20-2012, 19:57
fysiks
This message has been deleted by fysiks. Reason: nvm
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 11-20-2012 , 23:58   Re: Weird errors
Reply With Quote #3

Quote:
Originally Posted by Backstabnoob View Post
For 1, give_item already returns the entity ID so it's useless to use find_ent_by_owner. Try changing it
I did not understand how i should proceed.

There was an error line missing in the first one, i added it.
__________________
n0br41ner is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 11-21-2012 , 02:41   Re: Weird errors
Reply With Quote #4

For 2, show how you create g_fWallOrigin.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 11-21-2012 , 03:55   Re: Weird errors
Reply With Quote #5

I included the function you where asking for on the main post.
__________________
n0br41ner is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 11-21-2012 , 09:35   Re: Weird errors
Reply With Quote #6

What? I told you that give_item returns the weapon ID, so instead of using find_ent_by_owner do

new iEnt = give_item( iTempid, "weapon_usp" ) and check if the entity is valid (give_item should return something else on failure, not sure if 0 or -1) and pass that to the cs_set_weapon_silen function.

Also for the third, show us the whole public function instead of a part of it that's most likely completely irrelevant. Index out of bounds is thrown if you try to work with an array using an index that's above the array's limit, yet you don't work with any arrays in the code you've posted...

Last edited by Backstabnoob; 11-21-2012 at 09:43.
Backstabnoob is offline
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 11-21-2012 , 09:45   Re: Weird errors
Reply With Quote #7

Yeah i tried to remove the find_ent_by_owner, and ran the plugin, and still it didn't work so i dug some deeper and found out that the problem was from another function and i fixed it.

For the other function, i really don't know what i did but they are not happening again. I guess they are fixed.
__________________
n0br41ner is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 11-21-2012 , 11:56   Re: Weird errors
Reply With Quote #8

Quote:
Originally Posted by n0br41ner View Post
I included the function you where asking for on the main post.
I still cannot see where you created g_fWallOrigin
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 11-22-2012 , 16:27   Re: Weird errors
Reply With Quote #9

I am sorry neeeeel, but those are the only places where the g_fWallOrigin are present. Anyway as i said before, i got the problem under control.

Quote:
Originally Posted by n0br41ner
For the other function, i really don't know what i did but they are not happening again. I guess they are fixed.
__________________

Last edited by n0br41ner; 11-22-2012 at 16:28.
n0br41ner is offline
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 06:37.


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