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

[HELP] error 029: invalid expression, assumed zero


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-05-2015 , 11:07   [HELP] error 029: invalid expression, assumed zero
Reply With Quote #1

Hello,
I have just created this plugin, but when I tried compiling it, it displays me a error

"error 029: invalid expression, assumed zero"

Here's the Code, please help me if you can...
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Congrats PlaYer"
#define VERSION "1.0"
#define AUTHOR "Striker"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("DeathMsg", "ScoreCongrats", "a")
	register_cvar("frags_congrats", "50")
}

public ScoreCongrats (id) {
	if(get_user_frags(id)) >= get_cvar_num("ScoreCongrats"); {
		
		set_hudmessage(0, 255, 0, -1.0, -1.0)
		show_hudmessage(id, "Congrats for 50 Kills. We gave you 5 Frgas...Keep Fragging!")
	}
}
Thank You.
VarmaRitik is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 02-05-2015 , 15:38   Re: [HELP] error 029: invalid expression, assumed zero
Reply With Quote #2

Learn basics there is a lot of tutorial .

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Congrats PlaYer" #define VERSION "1.0" #define AUTHOR "Striker" new Score_Congrats public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         Score_Congrats = register_cvar("frags_congrats", "50")     } public ScoreCongrats (id) {     if(get_user_frags(id) >= get_pcvar_num(Score_Congrats)){                 set_hudmessage(0, 255, 0, -1.0, -1.0)         show_hudmessage(id, "Congrats for 50 Kills. We gave you 5 Frgas...Keep Fragging!")     } }

Last edited by Freezo Begin; 02-05-2015 at 15:51.
Freezo Begin is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-05-2015 , 15:43   Re: [HELP] error 029: invalid expression, assumed zero
Reply With Quote #3

[QUOTE=Freezo Begin;2258865]Learn basics there is a lot of tutorial .

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Congrats PlaYer" #define VERSION "1.0" #define AUTHOR "Striker" new Score_Congrats public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event("DeathMsg", "ScoreCongrats", "a")     Score_Congrats = register_cvar("frags_congrats", "50")     } public ScoreCongrats (id) {     if(get_user_frags(id) >= get_pcvar_num(Score_Congrats)){                 set_hudmessage(0, 255, 0, -1.0, -1.0)         show_hudmessage(id, "Congrats for 50 Kills. We gave you 5 Frgas...Keep Fragging!")     } }
[/QUOT
DeathMsg has no param in header, read event data as attacker victim weapon with read data.
__________________

Last edited by HamletEagle; 02-05-2015 at 15:44.
HamletEagle is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 02-05-2015 , 15:51   Re: [HELP] error 029: invalid expression, assumed zero
Reply With Quote #4

Yep I didn't pay attention .
Freezo Begin is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 02-05-2015 , 23:47   Re: [HELP] error 029: invalid expression, assumed zero
Reply With Quote #5

Itt wont work with bot so test with player only
PHP Code:
#include <amxmodx>

#define PLUGIN "Congrats PlaYer"
#define VERSION "1.0"
#define AUTHOR "Striker"

new Score_Congrats;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_logevent("Roundstart"2"1=Round_Start");
    
Score_Congrats register_cvar("frags_congrats""50");
}

public 
Roundstart() 
{
    new 
Players[32];
    new 
Num;
    new 
id;
    
get_playersPlayersNum"ch"); //skip bot and hltv 
    
for( --NumNum >= 0Num-- )
    {
        
id=Players[Num];
        
         if(
get_user_frags(id) >= get_pcvar_num(Score_Congrats))
       {
        
set_hudmessage(02550, -1.0, -1.0);
        
show_hudmessage(id"Congrats for 50 Kills. We gave you 5 Frgas...Keep Fragging!");
      }
    }

__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 02-05-2015 at 23:54.
indraraj striker is offline
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 02-06-2015 , 00:36   Re: [HELP] error 029: invalid expression, assumed zero
Reply With Quote #6

Quote:
Originally Posted by VarmaRitik View Post
Hello,
I have just created this plugin, but when I tried compiling it, it displays me a error

"error 029: invalid expression, assumed zero"

Here's the Code, please help me if you can...
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Congrats PlaYer"
#define VERSION "1.0"
#define AUTHOR "Striker"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "ScoreCongrats", "a")
    register_cvar("frags_congrats", "50")
}

public ScoreCongrats (id) {
    if(get_user_frags(id)) >= get_cvar_num("ScoreCongrats"); {
        
        set_hudmessage(0, 255, 0, -1.0, -1.0)
        show_hudmessage(id, "Congrats for 50 Kills. We gave you 5 Frgas...Keep Fragging!")
    }
}
Thank You.
Event DeathMsg has no parameters, use read_data to get killer or victim
__________________
Shiina.Mashiro is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-06-2015 , 02:26   Re: [HELP] error 029: invalid expression, assumed zero
Reply With Quote #7

PHP Code:
#include <amxmodx>

#define PLUGIN ""
#define VERSION "1.0"
#define AUTHOR ""

// Variable
new g_iScore

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("DeathMsg""event_deathMsg""a""1>0")
    
    
g_iScore register_cvar("cs_frag_limit""50")
}

public 
event_deathMsg()
{
    new 
iKilleriKiller read_data(1)
    new 
iVictimiVictim read_data(2)
    
    if(!
is_user_alive(iKiller) || iVictim == iKiller)
        return
    
    
// If player has killed more that the limit
    
if(get_user_frags(iKiller) >= get_pcvar_num(g_iScore))
    {
        
// Other codes.
    
}

zmd94 is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-06-2015 , 02:30   Re: [HELP] error 029: invalid expression, assumed zero
Reply With Quote #8

Thanks to all of u my friends..You guys helped me a lot..
Thank You so much.

Thank You.
VarmaRitik 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 02:53.


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