AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   sma error (https://forums.alliedmods.net/showthread.php?t=173098)

xtothx95 11-30-2011 06:11

sma error
 
rror 052: multi-dimensional arrays must be fully initialized

PLS help:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Say Chat Sounds"
#define VERSION "1.0"
#define AUTHOR "Kiti"

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say","Say_sounds")
}


// A szavak melyeket beirsz a chatbe

new phrase[1][] = {"elnezest", "bocsanat"}

new phrase1[2][] = {"faszba", "picsaba"}

new phrase2[3][] = {"hehe", "haha"}

new phrase3[4][] = {"franci", "francba"}

new phrase4[5][] = {"uram", "fonok"}

new phrase5[6][] = {"terulet", "hely"}

new phrase6[7][] = {"ahh", "ohh"}

////////////////////////////////////////////////////////////////////////////////////////////////////

// A hangok melyek hallatszani fognak

new elnezest [] = {"misc/elnezest"}

new faszba [] = {"misc/faszba"}

new hehe [] = {"misc/hehe"}

new franci [] = {"misc/franci"}

new uram [] = {"misc/uram"}

new terulet [] = {"misc/terulet"}

new ahh [] = {"misc/ahh"}

////////////////////////////////////////////////////////////////////////////////////////////////////

public Say_sounds(id)
{
new said[192]
read_args(said,191)
for(new i = 0 ;i < 1; i++)
if(containi(said,phrase[i]) != -1){
client_cmd(0,"spk %s",elnezest)
server_cmd("amx_tsay red <> elnezest <>")
break;
}
for(new i = 0 ;i < 2; i++)
if(containi(said,phrase1[i]) != -1){
server_cmd("amx_tsay red <> faszba <>")
client_cmd(0,"spk %s",faszba)
break;
}
for(new i = 0 ;i < 3; i++)
if(containi(said,phrase2[i]) != -1){
server_cmd("amx_tsay red <> hehe <>")
client_cmd(0,"spk %s",hehe)
break;
}
for(new i = 0 ;i < 4; i++)
if(containi(said,phrase3[i]) != -1){
server_cmd("amx_tsay red <> franci <>")
client_cmd(0,"spk %s",franci)
break;
}
for(new i = 0 ;i < 5; i++)
if(containi(said,phrase4[i]) != -1){
server_cmd("amx_tsay red <> uram <>")
client_cmd(0,"spk %s",uram)
break;
}
for(new i = 0 ;i < 6; i++)
if(containi(said,phrase5[i]) != -1){
server_cmd("amx_tsay red <> terulet <>")
client_cmd(0,"spk %s",terulet)
break;
}
for(new i = 0 ;i < 7; i++)
if(containi(said,phrase6[i]) != -1){
server_cmd("amx_tsay red <> ahh <>")
client_cmd(0,"spk %s",ahh)
break;
}

}

public plugin_precache(){

precache_sound("misc/elnezest.mp3")
precache_sound("misc/faszba.mp3")
precache_sound("misc/hehe.mp3")
precache_sound("misc/franci.mp3")
precache_sound("misc/uram.mp3")
precache_sound("misc/terulet.mp3")
precache_sound("misc/ahh.mp3")
}

kiki33hun 11-30-2011 06:56

Re: sma error
 
Hungary reply for member: Tesó használd a magyar fórumot az aláírásomban ott van:)

Nyuszy 11-30-2011 09:29

Re: sma error
 
Code:

new phrase[1][] = {"elnezest", "bocsanat"}

new phrase1[2][] = {"faszba", "picsaba"}
...

-->>
Code:

new phrase[2][] = {"elnezest", "bocsanat"}

new phrase1[2][] = {"faszba", "picsaba"}
...

és a for ciklusaid:
Code:

for(new i = 0; i <= 1; i++)

raghunarnindi001 11-30-2011 10:22

Re: sma error
 
precache does not support .mp3 files .... its will support .wav files
use some converter to convert them .... :D

drekes 11-30-2011 10:55

Re: sma error
 
To precache mp3's, you have to use precache_generic() & add "sound/" in the file path.

PHP Code:

precache_generic("sound/mysound.mp3"); 



All times are GMT -4. The time now is 08:33.

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