Raised This Month: $ Target: $400
 0% 

Errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
krekers
Junior Member
Join Date: Jul 2007
Old 11-14-2007 , 12:53   Errors
Reply With Quote #1

Hi.

I have problem with my script. I got many errors, but I don't understand why.

errors:
Code:
error 017: undefined symbol "id"
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
the code:

Code:
public sayname()
{
  new szAuthid[32], szName[32];
  get_user_authid( id, szAuthid, 31 );
  get_user_name( id, szName, 31 );
     
client_print(0,print_chat, szName)
}
krekers is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-14-2007 , 13:15   Re: Errors
Reply With Quote #2

You need to pass the id to this function from wherever you're calling it at.

PHP Code:
public sayname(id)
{
    new 
szAuthid[32], szName[32];
    
get_user_authididszAuthid31 );
    
get_user_nameidszName31 );
    
client_print(0print_chatszName);

hlstriker is offline
krekers
Junior Member
Join Date: Jul 2007
Old 11-14-2007 , 14:05   Re: Errors
Reply With Quote #3

OK, thanks. Now it works, but I've warning: loose indentation.

Before I posted this, I searched about the warning. There were many topics about this, but I still don't understand
In one topic there were something about if function and the { }, in another topic there were something about free spaces etc.Please, can you explain me about that warning and how can I remove it?


Edit: I tested the plugin. It works, but I don't like that, where is printed the result.
For example:

Mynick <-- this is the result, printed by my plugin
Mynick: /command

Why the result is printed before my nick?

Last edited by krekers; 11-17-2007 at 02:19.
krekers is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-14-2007 , 15:03   Re: Errors
Reply With Quote #4

Is that your full script?
If it is, you're missing plugin_init()
[ --<-@ ] Black Rose is offline
krekers
Junior Member
Join Date: Jul 2007
Old 11-14-2007 , 16:11   Re: Errors
Reply With Quote #5

Nope. That isnt full script. But thats the piece of script where is the problem. There is pugin_init(), includes, connecting to mysql server etc. All is ok when i connected to mysql server. There is no problem. Problem begins in the given piece of code.
krekers is offline
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 01:14.


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