Raised This Month: $ Target: $400
 0% 

Error: Number of arguments does not match definition on line 606


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 06-06-2010 , 18:33   Error: Number of arguments does not match definition on line 606
Reply With Quote #1

PHP Code:
new szPlayer pev(pFlagpev_aiment);

// a bunch of code through here, all the stuff matches and is correct, trus me.

AddHealthCheckMax(szPlayer50.0); 
PHP Code:
// adds health, not exceeding max, returns 1 if any health was added
AddHealthCheckMax(pEntity, const Float:iValue)
{
    
// raise us to max health, don't reduce health if health is above max (from medic boost)
    
if(entity_get_float(pEntityEV_FL_health) < entity_get_float(pEntityEV_FL_max_health))
    {
        
//pEntity->v.health = min(pEntity->v.max_health, pEntity->v.health + iValue);
        
entity_set_float(pEntityEV_FL_healthfloatmin(entity_get_float(pEntityEV_FL_health), (entity_get_float(pEntityEV_FL_health) + iValue)) )
        return 
true;
    }
    else
        return 
false;
    return 
pEntity;

__________________
+|- KARMA Respectively

HLM is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-06-2010 , 22:03   Re: Error: Number of arguments does not match definition on line 606
Reply With Quote #2

Are you sure that's the function that is causing this? I compile it just fine.

FYI,

Do NOT use the prefix "sz" for something that is not a string. It makes your code extremely confusing! "sz" means "string, zero-terminated"

Your function should be tagged according to your return value. When you return true or false your function is a bool. AND, all your return values should be of the same type.

Unreachable code:

PHP Code:
    return pEntity
__________________
fysiks is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 06-06-2010 , 22:08   Re: Error: Number of arguments does not match definition on line 606
Reply With Quote #3

I will look through it again and recode it, but as for the returning lines, I dont trule "need" a return value, since it goes ahead and does what it needs to do anyways, the return was something I just included while converting from C++ -> Small, I will probably be removing it, and I guess I need to go through and fix the warnings and check the lines before going to the errors, I dont know.. maybe ill figure it out, lol.
__________________
+|- KARMA Respectively

HLM 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 05:18.


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