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

Error: Argument type mismatch (argument 2) on line 323


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MuzzMikkel
Member
Join Date: Aug 2010
Location: Denmark
Old 06-01-2011 , 10:42   Error: Argument type mismatch (argument 2) on line 323
Reply With Quote #1

So i added a hero called Sentinel (some kind of sentry gun) and when i try to compile it, it says:

Code:
<323> : error 035: argument type mismatch (argument 2)
Line 323 is:

PHP Code:
        tEnt find_entity(tEnt,classname,"sentinel_tower"
The whole function is:

PHP Code:
public new_round(id

    
remove_task(id)
    if(
towerammo[id] < get_cvar_num("Sentinel_towerammo")) 
        
towerammo[id] = get_cvar_num("Sentinel_towerammo"
    
    new 
tEnt
    
    
do { 
        
tEnt find_entity(tEnt,classname,"sentinel_tower"
        if(
tEnt 0
            
RemoveEntity(tEnt
    } 
    while(
tEnt
        
    return 
PLUGIN_HANDLED 

MuzzMikkel is offline
Send a message via MSN to MuzzMikkel
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 06-01-2011 , 10:55   Re: Error: Argument type mismatch (argument 2) on line 323
Reply With Quote #2

PHP Code:
/* Find an entity ID from start_from_ent id (use 0 to start from
 * the beginning, category is either "classname", "target" or
 * "targetname", value is the name you are searching for */
stock find_entity(start_from_entcategoryvalue[]) {
    switch (
category) {
        case 
target: return find_ent_by_target(start_from_entvalue);
        case 
targetname: return find_ent_by_tname(start_from_entvalue);
    }
    return 
find_ent_by_class(start_from_entvalue);

__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 06-01-2011 , 10:56   Re: Error: Argument type mismatch (argument 2) on line 323
Reply With Quote #3

change to
PHP Code:
tEnt vexd_find_entity(tEnt,"sentinel_tower"0
though I'm not sure how well this hero will work for you considering it was originally made for amx not amxx. Good luck with it none the less

edit: where is that definition of find_entity Dark? Cause in VexdUM_stock it's redefined to
Code:
#define find_entity vexd_find_entity
__________________
If at first you don't succeed, then skydiving isn't for you.

Last edited by G-Dog; 06-01-2011 at 11:00.
G-Dog is offline
Send a message via AIM to G-Dog
MuzzMikkel
Member
Join Date: Aug 2010
Location: Denmark
Old 06-01-2011 , 11:00   Re: Error: Argument type mismatch (argument 2) on line 323
Reply With Quote #4

Thank you guys ;)
MuzzMikkel is offline
Send a message via MSN to MuzzMikkel
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 06-01-2011 , 11:06   Re: Error: Argument type mismatch (argument 2) on line 323
Reply With Quote #5

Quote:
Originally Posted by G-Dog View Post
edit: where is that definition of find_entity Dark? Cause in VexdUM_stock it's redefined to
Code:
#define find_entity vexd_find_entity
Found it in xtrafun, I think.

I missed the re-define so I was useless D:
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 06-01-2011 , 11:15   Re: Error: Argument type mismatch (argument 2) on line 323
Reply With Quote #6

Quote:
Originally Posted by DarkGod View Post
Found it in xtrafun, I think.

I missed the re-define so I was useless D:
aaa now I see it, so plugin was made to use that definition originally, but if vexd is included then it looks for the other define which is what caused the error.
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
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 02:59.


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