AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Error help (https://forums.alliedmods.net/showthread.php?t=220087)

sfa990103 07-06-2013 21:50

Error help
 
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).

fysiks 07-06-2013 21:54

Re: Error help
 
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.

sfa990103 07-06-2013 22:52

Re: Error help
 
what wrong in the last 4 error?

fysiks 07-06-2013 23:14

Re: Error help
 
Quote:

Originally Posted by sfa990103 (Post 1985071)
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.

simanovich 07-07-2013 10:26

Re: Error help
 
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);
    }



fysiks 07-07-2013 13:52

Re: Error help
 
Quote:

Originally Posted by simanovich (Post 1985439)
Try now:

We are no in the Suggestion/Requests section . . .


All times are GMT -4. The time now is 06:25.

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