View Single Post
ExKiLL
Senior Member
Join Date: Nov 2005
Location: Germany
Old 05-28-2007 , 05:07   Re: Deutsche Scripting-Hilfe
#20

danke für die erklärung

der code lässt sich aber nicht compli.... dingsbums da ;)

wenn ich es so einfüge wie du es mir geschrieben hast, kommt
Code:
/home/groups/amxmodx/tmp3/phptMd8Nz.sma(79) : error 021: symbol already defined: "register_clcmd"
zeile 79 fangen die register_clcmd´s an, die ich festgelegt habe
Code:
register_clcmd("say /shield", "shield")
register_clcmd("say /schild", "shield")
.....
und wenn ich die register noch vor der } von public shield(id) einfüge, also unter return PLUGIN_HANDLED_MAIN;

Code:
public shield(id)
{
    client_cmd(id, "shield")
    return PLUGIN_HANDLED_MAIN;

register_clcmd("say /shield", "shield")
register_clcmd("say shield", "shield")
register_clcmd("say .shield", "shield")
register_clcmd("say schild", "shield")
register_clcmd("say /schild", "shield")
register_clcmd("say .schild", "shield")

}
kommt das
Code:
/home/groups/amxmodx/tmp3/phpdlSroh.sma(75) : warning 225: unreachable code
/home/groups/amxmodx/tmp3/phpdlSroh.sma(75) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpdlSroh.sma(82) : warning 209: function "shield" should return a value
Header size:            492 bytes
Code size:             1268 bytes
Data size:             1192 bytes
Stack/heap size:      16384 bytes; estimated max. usage=40 cells (160 bytes)
Total requirements:   19336 bytes

3 Warnings.
Done.
aber gehen tuts so auch nicht, /shield wird im chat gezeigt aber kein schild gekauft

woran liegt das?
darf ich den code nich irgendwo hinsetzen, ich hab ihn jetzt am ende stehen

gruß
__________________
193.192.59.43:27015 ----- italy ( 20 )
85.25.150.62:27015 ------ sHclachthaus ( 14 )
85.25.150.62:27055 ------ DeathMatch ( 20 )
85.25.150.62:27035 ------ Kreedz Hangout ( 18 )
85.214.100.160:27015 ---- 24/7 full house | **GG + DM** ( 32 )
93.190.64.150:27015 ----- Superhero (12)
ExKiLL is offline