Raised This Month: $ Target: $400
 0% 

Error help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sfa990103
New Member
Join Date: Jul 2013
Old 07-06-2013 , 21:50   Error help
Reply With Quote #1

PHP Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "bossmdl"
#define VERSION "0.1"
#define AUTHOR "sfa990103"

new _boss
new boss[] = "boss"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("logevent_round_start",2"1=Round_Start")
    
}

public 
plugin_precache() {
precache_model("model/player/%s/%s.mdl"bossboss)
}

public 
logevent_round_start()
{
get_playersplayersnum"ae""T" )

cs_set_user_model(idboss)
set_user_health(id30000)
set_user_armor(id3000)
}

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Number of arguments does not match definition on line 22
Error: Undefined symbol "players" on line 27
Error: Undefined symbol "num" on line 27
Warning: Expression has no effect on line 27
Warning: Expression has no effect on line 27
Error: Expected token: ";", but found ")" on line 27
Error: Too many error messages on one line on line 27

Compilation aborted.
5 Errors.
Could not locate output file E:\CS\csbs\cstrike\addons\amxmodx\plugins\Unt itled.amx (compile failed).
sfa990103 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-06-2013 , 21:54   Re: Error help
Reply With Quote #2

Not all functions can be used to format strings. You cannot format a string with precache_mode().

The second and third errors, you can solve for yourself.
__________________

Last edited by fysiks; 07-06-2013 at 21:55.
fysiks is offline
sfa990103
New Member
Join Date: Jul 2013
Old 07-06-2013 , 22:52   Re: Error help
Reply With Quote #3

what wrong in the last 4 error?
sfa990103 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-06-2013 , 23:14   Re: Error help
Reply With Quote #4

Quote:
Originally Posted by sfa990103 View Post
what wrong in the last 4 error?
Fix the first ones first then recompile and see if they still exist.

Also, find existing code that uses get_players() because you are not understanding how it works.
__________________

Last edited by fysiks; 07-06-2013 at 23:16.
fysiks is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 07-07-2013 , 10:26   Re: Error help
Reply With Quote #5

Try now:
PHP Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "bossmdl"
#define VERSION "0.1"
#define AUTHOR "sfa990103"

new _boss// dafuq is that for?
new boss[] = "boss";

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_logevent("logevent_round_start",2"1=Round_Start");
}

public 
plugin_precache(){
    new 
szModel[64];
    
formatex(szModel,charsmax(szModel),"models/player/%s/%s.mdl",boss,boss);
    
precache_model(szModel);
}

public 
logevent_round_start(){
    static 
players[32],pnum;
    
get_players(players,num"aeh""TERRORIST");

    for (new 
ipnumi++)
    {
        
cs_set_user_model(players[i],boss);
        
set_user_health(players[i],30000);
        
set_user_armor(players[i],3000);
    }

__________________
simanovich is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-07-2013 , 13:52   Re: Error help
Reply With Quote #6

Quote:
Originally Posted by simanovich View Post
Try now:
We are no in the Suggestion/Requests section . . .
__________________
fysiks 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:25.


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