Raised This Month: $ Target: $400
 0% 

Errors Compiling Cant FIgure it out!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 01-01-2006 , 20:43   Errors Compiling Cant FIgure it out!
Reply With Quote #1

Code:
<amxmodx> <amxmisc> <cstrike> <engine> #DEFINE PLUGIN_NAME "Name Changer" #DEFINE PLUGIN_VERSION "1.0" #DEFINE PLUGIN_AUTHOR "hYp3r" #DEFINE [MAXNAMES] "3" #DEFINE newPlayerName "www.1HitKill.com" public plugin_init {    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);    register_event("CurWeapon", "Weapon_check", "be") ; } public Weapon_check(id) {    new name    cs_get_user_name(id, name, 32);    new allowednames[MAXNAMES][3] = {       "empty",       "Player",       "player" }    if(equali(allowednames, name) {    client_cmd("name %s, newPlayerName")    return_PLUGIN }

Doesnt compile right please help me and look at it/

thanks.!
Styles is offline
Send a message via AIM to Styles
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-01-2006 , 20:51  
Reply With Quote #2

It needs to be

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <engine>
SubFive is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-01-2006 , 20:52  
Reply With Quote #3

Instead of generically asking for help, tell people what kind of compile errors you're getting.

Edit: There's just about something wrong with every line of code you have there. Look at how other plugins do things and then try again.
Brad is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 01-01-2006 , 20:52  
Reply With Quote #4

Lmfao. I think you should just delete this and start over. I lost count of how many errors are in there bud.

Code:
public plugin_init {

Missing ()

Etc.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-01-2006 , 20:54   Re: Errors Compiling Cant FIgure it out!
Reply With Quote #5

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <engine> #DEFINE PLUGIN_NAME "Name Changer" #DEFINE PLUGIN_VERSION "1.0" #DEFINE PLUGIN_AUTHOR "hYp3r" #DEFINE [MAXNAMES] "3" #DEFINE newPlayerName "www.1HitKill.com" public plugin_init {    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);    register_event("CurWeapon", "Weapon_check", "be") ; } public Weapon_check(id) {     new name     cs_get_user_name(id, name, 32);     new allowednames[MAXNAMES][3] = {     "empty",     "Player",     "player"     }     if(equali(allowednames, name)     {         client_cmd("name %s, newPlayerName")     } }

That should fix some errors.
SubFive is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 01-01-2006 , 20:55  
Reply With Quote #6

This took me 6 days and 7 nights to fix:
Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN_NAME "Name Changer" #define PLUGIN_VERSION "1.0" #define PLUGIN_AUTHOR "hYp3r" #define MAXNAMES 3 #define newPlayerName "www.1HitKill.com" public plugin_init() {    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR); } new allowednames[MAXNAMES][] = {       "empty",       "Player",       "player" } public client_infochanged(id) {    new name[32]    get_user_name(id, name, 32);    for(new i = 0; i < MAXNAMES; i++)    {       if(equali(allowednames[i], name))        client_cmd(id, "name %s", newPlayerName)    } }



__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 01-01-2006 , 23:15  
Reply With Quote #7

1) That checks if their old name is allowed or not.
2) You should check if their old name (get_user_name()) and new name (get_user_info( id , "name",...)) are different before you check to see if they are allowed.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 01-02-2006 , 00:24  
Reply With Quote #8

ok thanks for the tip! and thanks for your help osrry learning to code not an expert...
Styles is offline
Send a message via AIM to Styles
Reply


Thread Tools
Display Modes

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 16:03.


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