First plugin attempt - Error 010
Well heres my first attempt at writing a plugin, and i think i got everything right except when i goto compile it i get 2 error 010's
Code:
/* Plugin generated by tomato_love*/Code:
Your plugin failed to compile! Read the errors below:Thanks in advance! |
Re: First plugin attempt - Error 010
You have a } before the if statement. Remove it and place one at the end of the file
|
Re: First plugin attempt - Error 010
thank you very much for your quick and helpful response. compiled it and tested, but unfortunately it does not work at all lol :(
do i have to define say and team_say somewhere?? |
Re: First plugin attempt - Error 010
You have to hook the command 'say'
register_clcmd("say", "yo_say") |
Re: First plugin attempt - Error 010
Thank you very much! I think that did it! But still not quite right - when i type something and add the 'yo' my name shows up like its supposed to, but no text. Also when not using the "yo" no name or text appears at all. Should i unhook the say? or should the PLUGIN_HANDLED be something different?
or should: Code:
if( (contain(said, "yo") != -1) && !(contain(said, " yo") != -1) ) { |
Re: First plugin attempt - Error 010
Quote:
%s - string %d - interger %f - float ie. new iNumber = 10 new szTest[] = "hello" new Float:fNum = 0.50 To print these in a string. client_print( 0 , print_chat , "%s please give me %d dollars. i will give you %f cents." , szTest , iNumber , fNum ) The above will result in "hello please give me 10 dollars. i will give you 0.50 cents." PHP Code:
|
Re: First plugin attempt - Error 010
You guys are great! +karma all around. Works great, lastly i have a duplication issue now, it appears to all and then still shows up as a normal message. How would i go about eliminating that?
Also i would like eliminate the 'yo' all together once the text is processed. For instance, i wanted an all say: "yo NICE SHOT YOU JERK!!" the output would be: "tomato_love : NICE SHOT YOU JERK!!" w/o the 'yo' |
Re: First plugin attempt - Error 010
Quote:
The first parameter specifies who the message is printed to. In your code, 0 is passed which results in all players. To make it only print to a specific player, you must specify the player id. client_print( 0, print_chat, "%s said %s" , name , said ) |
Re: First plugin attempt - Error 010
|
Re: First plugin attempt - Error 010
Paste your entire plugin and I will see whats wrong.
|
| All times are GMT -4. The time now is 17:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.