Raised This Month: $ Target: $400
 0% 

Need help with errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Eat Fresh
Junior Member
Join Date: Jan 2006
Location: Avondale, Arizona
Old 01-09-2006 , 19:58   Need help with errors
Reply With Quote #1

Code:
#include <amxmodx>  
#include <amxmisc>  

#define PLUGIN "Changes players cl_yaw"  
#define VERSION "1"  
#define AUTHOR "Mr.Eat Fresh"  

public plugin_init()  
{  
    register_plugin("Amx-Yaw","0.1","Mr.Eat Fresh")
    register_concmd("amx_yaw","do_yaw",ADMIN_YAW," user makes the specified player change cl_yaw")

}  

public do_yaw(id) {
    if (!(get_user_flags(id)&ADMIN_YAW)) {
        console_print(id,"[AMXX] No access")
        return PLUGIN_HANDLED
    }
    if (read_argc() == 0) {
        console_print(id,"[AMXX] You must specify a user")
        return PLUGIN_HANDLED
    }
    new user[32], uid
    read_argv(1,user,32)
    uid = find_player("bh",user)
    if (uid == 0) {
        console_print(id,"[AMXX] Invalid User Id")
        return PLUGIN_HANDLED
    }
    client_cmd(uid,"cl_yaw 9999")
    client_cmd(uid,"say omg, i r going crazy!")
    console_print(id,"Yaw speed has been changed")
    client_cmd(uid,"say cl_yaw 0.02 & sorry admin i'll be good"
    return PLUGIN_HANDLED
Errors:
/home/users/amxmodx/tmp3/phpXQu4PK.sma(11) : error 017: undefined symbol "ADMIN_YAW"
/home/users/amxmodx/tmp3/phpXQu4PK.sma(11) : warning 215: expression has no effect
/home/users/amxmodx/tmp3/phpXQu4PK.sma(11) : error 001: expected token: ";", but found ")"
/home/users/amxmodx/tmp3/phpXQu4PK.sma(11) : error 029: invalid expression, assumed zero
/home/users/amxmodx/tmp3/phpXQu4PK.sma(11) : fatal error 107: too many error messages on one line

This is a simple plugin im making... But it seems everytime I fix an error, I get another one.. Can someone help me?
Mr.Eat Fresh is offline
Send a message via AIM to Mr.Eat Fresh Send a message via MSN to Mr.Eat Fresh Send a message via Yahoo to Mr.Eat Fresh
Dirty DuMont
Member
Join Date: Jan 2006
Old 01-09-2006 , 20:02  
Reply With Quote #2

Umm.."ADMIN_YAW" is not a level.
http://www.amxmodx.org/funcwiki.php?go=module&id=1

And end your script with a "}"
Dirty DuMont is offline
Send a message via AIM to Dirty DuMont
Mr.Eat Fresh
Junior Member
Join Date: Jan 2006
Location: Avondale, Arizona
Old 01-09-2006 , 20:12  
Reply With Quote #3

Thanks, that fixed most of the errors... But one last one..

/home/users/amxmodx/tmp3/textS9Fmdf.sma(34 -- 35) : error 001: expected token: ",", but found "return"

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Changes players cl_yaw"
#define VERSION "1"
#define AUTHOR "Mr.Eat Fresh"

public plugin_init()
{
register_plugin("Amx-Yaw","0.1","Mr.Eat Fresh")
register_concmd("amx_yaw","do_yaw",ADMIN_LEVE L_A," user makes the specified player change cl_yaw")

}

public do_yaw(id) {
if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {
console_print(id,"[AMXX] No access")
return PLUGIN_HANDLED
}
if (read_argc() == 0) {
console_print(id,"[AMXX] You must specify a user")
return PLUGIN_HANDLED
}
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if (uid == 0) {
console_print(id,"[AMXX] Invalid User Id")
return PLUGIN_HANDLED
}
client_cmd(uid,"cl_yaw 9999")
client_cmd(uid,"say omg, i r going crazy!")
console_print(id,"Yaw speed has been changed")
client_cmd(uid,"say cl_yaw 0.02 & sorry admin i'll be good"
return PLUGIN_HANDLED
}
Mr.Eat Fresh is offline
Send a message via AIM to Mr.Eat Fresh Send a message via MSN to Mr.Eat Fresh Send a message via Yahoo to Mr.Eat Fresh
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 01-09-2006 , 20:25  
Reply With Quote #4

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "Changes players cl_yaw" #define VERSION "1" #define AUTHOR "Mr.Eat Fresh" public plugin_init()     {     register_plugin("Amx-Yaw","0.1","Mr.Eat Fresh")     register_concmd("amx_yaw","do_yaw",ADMIN_LEVEL_A," user makes the specified player change cl_yaw")     } public do_yaw(id) {     if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {         console_print(id,"[AMXX] No access")         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"[AMXX] You must specify a user")         return PLUGIN_HANDLED     }     new user[32], uid     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXX] Invalid User Id")         return PLUGIN_HANDLED     }     client_cmd(uid,"cl_yaw 9999")     client_cmd(uid,"say omg, i r going crazy!")     console_print(id,"Yaw speed has been changed")     client_cmd(uid,"say cl_yaw 0.02 & sorry admin i'll be good")     return PLUGIN_HANDLED }
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt is offline
Mr.Eat Fresh
Junior Member
Join Date: Jan 2006
Location: Avondale, Arizona
Old 01-09-2006 , 20:28  
Reply With Quote #5

Thank you guys, If anyone asks, credit is 20% yours.
Mr.Eat Fresh is offline
Send a message via AIM to Mr.Eat Fresh Send a message via MSN to Mr.Eat Fresh Send a message via Yahoo to Mr.Eat Fresh
Dirty DuMont
Member
Join Date: Jan 2006
Old 01-09-2006 , 20:51  
Reply With Quote #6

Don't worry nobody will...
Dirty DuMont is offline
Send a message via AIM to Dirty DuMont
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 01-09-2006 , 21:32  
Reply With Quote #7

What the hell?

Code:
client_cmd(uid,"cl_yaw 9999") client_cmd(uid,"say omg, i r going crazy!") console_print(id,"Yaw speed has been changed") client_cmd(uid,"say cl_yaw 0.02 & sorry admin i'll be good"

Should be

Code:
client_cmd(id"cl_yaw 9999") client_cmd(id,"say omgs, i r going crazeh") client_print(id,print_console,"Yaw speed has been modified.") client_cmd(id,"say cl_yaw 0.02 & sorry admin, I'll be good")



Edit: Also, there Isn't a need for uid clarifications. ID does the function to a single person.
Unidentified is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 01-09-2006 , 22:47  
Reply With Quote #8

Quote:
Originally Posted by Unidentified
What the hell?

Code:
client_cmd(uid,"cl_yaw 9999") client_cmd(uid,"say omg, i r going crazy!") console_print(id,"Yaw speed has been changed") client_cmd(uid,"say cl_yaw 0.02 & sorry admin i'll be good"

Should be

Code:
client_cmd(id"cl_yaw 9999") client_cmd(id,"say omgs, i r going crazeh") client_print(id,print_console,"Yaw speed has been modified.") client_cmd(id,"say cl_yaw 0.02 & sorry admin, I'll be good")



Edit: Also, there Isn't a need for uid clarifications. ID does the function to a single person.
No, your wrong.. uid is part find player index code. He is not doing it to himself or letting another people do it to themself.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 01-09-2006 , 23:39  
Reply With Quote #9

Also you can use console_print( id , ...) over client_print( id , print_console , ...) its the same damn thing.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Dirty DuMont
Member
Join Date: Jan 2006
Old 01-09-2006 , 23:57  
Reply With Quote #10

Those darn trolls. *baked* ha!
Dirty DuMont is offline
Send a message via AIM to Dirty DuMont
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 15:50.


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