AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Song Name HELP (https://forums.alliedmods.net/showthread.php?t=193573)

MercedeSx7 08-20-2012 16:31

Song Name HELP
 
PHP Code:

#include < amxmodx >

public plugin_precache( )
{
    if( 
equalsound"win1.mp3" ) )
    {
        
client_print0print_chat"[Song Name] Mohombi - Bumpy Ride." )
        
formatsoundcharsmaxsound ), "sound/%s"sound )
        
precache_genericsound )
    }


I have errors, can someone fix them?
Thanks.

Liverwiz 08-20-2012 16:32

Re: I need help.
 
and what might, pre tell, would those errors be?

P.S. There are no clients to print to in plugin_precache So take out the client_print.

MercedeSx7 08-20-2012 16:34

Re: I need help.
 
If your looking for errors ( i didnt understad you )

PHP Code:

/tmp/textqEBdJ9.sma(5) : error 017undefined symbol "sound"
/tmp/textqEBdJ9.sma(8) : error 017undefined symbol "sound"
/tmp/textqEBdJ9.sma(8) : error 072"sizeof" operator is invalid on "function" symbols
/tmp/textqEBdJ9.sma(8) : error 029invalid expressionassumed zero
/tmp/textqEBdJ9.sma(8) : fatal error 107too many error messages on one line 


Liverwiz 08-20-2012 16:36

Re: I need help.
 
that's rather straight forward....sound needs to be a string.

new sound[32]
Then you need to put something in sound.

Show plugin_init as well.

MercedeSx7 08-20-2012 16:42

Re: I need help.
 
PHP Code:

#include < amxmodx > 

new const PLUGIN[ ] = "Song Name";
new const 
VERSION[ ] = "1.0";
new const 
AUTHOR[ ] = "MercedeS";

public 
plugin_init( )
{
    
register_pluginPLUGINVERSIONAUTHOR );
}

public 
plugin_precache( ) 

    if( 
equalsound"win1.mp3" ) ) 
    { 
        
client_print0print_chat"[Song Name] Mohombi - Bumpy Ride." );
        new 
sound32 ];
        
formatsoundcharsmaxsound ), "sound/%s"sound );
        
precache_genericsound ); 
    } 


PHP Code:

/tmp/textQ6vMYP.sma(14) : error 017undefined symbol "sound" 


lucas_7_94 08-20-2012 16:48

Re: I need help.
 
What you want to do exactly ?

MercedeSx7 08-20-2012 16:50

Re: I need help.
 
I want, when a sound plays like win1.mp3 it says is song name, i fixed it i will see now if it works.

ConnorMcLeod 08-20-2012 16:50

Re: I need help.
 
Every thread creators need help in this section, please change your title.

Liverwiz 08-20-2012 16:51

Re: I need help.
 
Quote:

Originally Posted by lucas_7_94 (Post 1777320)
What you want to do exactly ?

Yeah.....you're missing a lot of core things here. What do you expect sound to be? a cvar? or a magical dragon?


EDIT:
Quote:

Originally Posted by MercedeSx7 (Post 1777323)
I want, when a sound plays like win1.mp3 it says is song name, i fixed it i will see now if it works.

What kind of sound? different sounds get caught different ways. Is this a song played by a mod? a map ambiance? and does this play when you fart?

MercedeSx7 08-20-2012 16:54

Re: Song Name HELP
 
Quote:

Originally Posted by ConnorMcLeod (Post 1777324)
Every thread creators need help in this section, please change your title.

done

Quote:

Originally Posted by Liverwiz (Post 1777325)
Yeah.....you're missing a lot of core things here. What do you expect sound to be? a cvar? or a magical dragon?

->
Quote:

Originally Posted by MercedeSx7 (Post 1777323)
I want, when a sound plays like win1.mp3 it says is song name, i fixed it i will see now if it works.



All times are GMT -4. The time now is 05:44.

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