Hallo.
Undzwar wollte ich eine Funktion machen, die die Waffen ID rausfindet, wenn man den Namen eingibt. Aber es gibt ohne Ende Error. Bei jeder u.g. Zeile
new weapon = GetWeaponIDByName(wname); //ERROR
GivePlayerWeapon(pID, weapon, ammo);
stock GetWeaponIDByName(weaponname) {
new weaponid;
if(weaponname == "schlagring" || weaponname == "knuckle" || weaponname == 1) {weaponid = 1; return weaponid;}
else if(weaponname == "golfschläger" || weaponname == "golfschlaeger" || weaponname == "golf club"|| weaponname == "golf" || weaponname == 2) {weaponid = 2;return weaponid;}
else if(weaponname == "schlagstock" || weaponname == "stick" || weaponname == "nite stick" || weaponname == 3) {weaponid = 3;return weaponid;}
else if(weaponname == "messer" || weaponname == "taschenmesser" || weaponname == "knife"|| weaponname == 4) {weaponid = 4;return weaponid;}
else if(weaponname == "baseballschläger" || weaponname == "schläger" || weaponname == "baseball bat"|| weaponname == "bat"|| weaponname == 5) {weaponid = 5;return weaponid;}
else if(weaponname == "schaufel" || weaponname == "shovel" || weaponname == 6) {weaponid = 6;return weaponid;}
else if(weaponname == "billiard" || weaponname == "pool cue" || weaponname == 7) {weaponid = 7;return weaponid;}
else if(weaponname == "katana" || weaponname == "schwert" || weaponname == 8) {weaponid = 8;return weaponid;}
else if(weaponname == "kettensäge" || weaponname == "chainsaw" || weaponname == 9) {weaponid = 9;return weaponid;}
else if(weaponname == "dildo" || weaponname == 10|| weaponname == 13) {weaponid = 10;return weaponid;}
else if(weaponname == "vibrator" || weaponname == 11 || weaponname == 12) {weaponid = 12;return weaponid;}
else if(weaponname == "dildo" || weaponname == 13) {weaponid = 13;return weaponid;}
else if(weaponname == "blumenstrauß" || weaponname == "blumen" || weaponname == "flowers"|| weaponname == 14) {weaponid = 14;return weaponid;}
else if(weaponname == "granate" || weaponname == "grenade" || weaponname == 16) {weaponid = 16;return weaponid;}
else if(weaponname == "tränengas" || weaponname == "tear gas" || weaponname == 17) {weaponid = 17;return weaponid;}
else if(weaponname == "molotov" || weaponname == "molotov cocktail" || weaponname == 18) {weaponid = 18;return weaponid;}
else if(weaponname == "9mm" || weaponname == "pistol" || weaponname == 22) {weaponid = 22;return weaponid;}
else if(weaponname == "schalgedämpfte 9mm" || weaponname == "silenced pistol" || weaponname == 23) {weaponid = 23;return weaponid;}
else if(weaponname == "deagle" || weaponname == "desert eagle" || weaponname == 24) {weaponid = 24;return weaponid;}
else if(weaponname == "shotgun" || weaponname == "schrottflinte" || weaponname == 25) {weaponid = 25;return weaponid;}
else if(weaponname == "abgesägte schrottflinte" || weaponname == "sawn-off shotgun" || weaponname == 26) {weaponid = 26;return weaponid;}
else if(weaponname == "micro uzi"|| weaponname == "uzi" || weaponname == 28) {weaponid = 28;return weaponid;}
else if(weaponname == "mp5" || weaponname == 29) {weaponid = 29;return weaponid;}
else if(weaponname == "ak47" || weaponname == 30) {weaponid = 30;return weaponid;}
else if(weaponname == "m4" || weaponname == 31) {weaponid = 31;return weaponid;}
else if(weaponname == "tec9" || weaponname == 32) {weaponid = 32;return weaponid;}
else if(weaponname == "country rifle" || weaponname == 33) {weaponid = 33;return weaponid;}
else if(weaponname == "sniper rifle"|| weaponname == "sniper" || weaponname == 34) {weaponid = 34;return weaponid;}
else if(weaponname == "RPG" || weaponname == 35) {weaponid = 35;return weaponid;}
else if(weaponname == "flammenwerfer" || weaponname == 37) {weaponid = 37;return weaponid;}
else if(weaponname == "minigun" || weaponname == 38) {weaponid = 38;return weaponid;}
else if(weaponname == "rucksackbombe" || weaponname == 39) {weaponid = 39;return weaponid;}
else if(weaponname == "detonator" || weaponname == 40) {weaponid = 40;return weaponid;}
else if(weaponname == "sprühdose"|| weaponname == "spray can" || weaponname == 41) {weaponid = 41;return weaponid;}
else if(weaponname == "feuerlöscher"|| weaponname == "extinguisher" || weaponname == 42) {weaponid = 42;return weaponid;}
else if(weaponname == "kamera"|| weaponname == "camera" || weaponname == 43) {weaponid = 43;return weaponid;}
else if(weaponname == "nachtsichgerät"|| weaponname == "night vision" || weaponname == 44) {weaponid = 44;return weaponid;}
else if(weaponname == "infrarotbrille"|| weaponname == "thermobrille" || weaponname == 45) {weaponid = 45;return weaponid;}
else if(weaponname == "fallschirm"|| weaponname == "parachute" || weaponname == 46) {weaponid = 46;return weaponid;}
else {return 0;}
}
Fehler sind:
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(460) : error 035: argument type mismatch (argument 1)
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(713) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(714) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(715) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(716) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(717) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(718) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(719) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(720) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(721) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(722) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(723) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(724) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(725) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(726) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(727) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(728) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(729) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(730) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(731) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(732) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(733) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(734) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(735) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(736) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Timo\Desktop\Pawn\gammodes\blueberry.pwn(737) : error 001: expected token: "-string end-", but found "-identifier-"
Alles anzeigen
LG
Maydo