How would I fix these?
Code:
/home/groups/amxmodx/tmp3/textf2yecb.sma(9) : error 001: expected token: ",", but found "-identifier-"
/home/groups/amxmodx/tmp3/textf2yecb.sma(9) : warning 215: expression has no effect
/home/groups/amxmodx/tmp3/textf2yecb.sma(9) : error 001: expected token: ";", but found "-string-"
/home/groups/amxmodx/tmp3/textf2yecb.sma(9) : warning 215: expression has no effect
/home/groups/amxmodx/tmp3/textf2yecb.sma(9) : error 001: expected token: ";", but found "-rational value-"
/home/groups/amxmodx/tmp3/textf2yecb.sma(9) : fatal error 107: too many error messages on one line
Code:
#include <amxmodx>
#include <superheromod>
new gHeroName[]="PeterPan"
new bool:gHasSuperPower[SH_MAXSLOTS+1]
public plugin_init() {
register_plugin(""gHeroName", "1.0", "Shular")
register_cvar("Super_level", "10")
shCreateHero(gheroName[], "Fly, Super Dagger", false, "Super_level")
//superheromod.inc:
//stock shCreateHero(heroName[], heroPower[], heroHelp[], bool:requiresKeyEvents, heroLevel[])
register_srvcmd("{PeterPan_init", "PeterPan_init");
shRegHeroInit(PeterPan, "PeterPan_init");
register_cvar("PeterPan_mult", "1.5");
}
public Super_init() {
new temp[6]; //declare a temperary varriable
read_argv(1,temp,5); //reading the first argument will give you the id of the person who selected your hero
new id = str_to_num(temp); //transfer the string returned into a number and store it as the id
read_argv(2,temp,5); //second argument is whether they have the power or not
new hasPowers = str_to_num(temp);
gHasSuperPower[id] = (hasPowers != 0); //(hasPowers != 0) will either return 1 (if it is true that hasPowers != 0), or 0 (if it is false that hasPowers != 0)
}
public Event_damage(id) {
if (!shModActive() || !is_user_alive(id)) return PLUGIN_CONTINUE;
new damage = read_data(2); //this is covered in my events tut. (in helpful links)
new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart) //store what weapon used, bodypart hit, and attacker
new headshot = bodypart == 1 ? 1 : 0 //this is just short for:
/*if (bodypart == 1) {
headshot = 1;
} else {
headshot = 0;
}*/
if(attacker <= 0 || attacker > SH_MAXSLOTS ) return PLUGIN_CONTINUE; //checks ifs it was world that did the damage, and if so just end function.
if(gHasSuperPower[attacker] && is_user_alive(id)) { //if alive and have power
new extraDamage = floatround(damage * get_cvar_float("Super_mult") - damage); //calculate extra damage ([damage done x multiplier] - damage done = extra damage)
if (extraDamage > 0) {
shExtraDamage( id, attacker, extraDamage, "Super damage Mult", headshot ); //superheromod.inc: stock shExtraDamage(id, attacker, damage, weaponDescription[], headshot = 0);
}
}
}
__________________