Help with errors and a question
#1

Ok im trying to make this event system but i want to set it so when the admin sets the weapon they can either enter the weapon id or the name so this is my coding
PHP код:
  new weapid,wname[50],wep,weap;
            if(
sscanf(params"s[8]ii"optionwepweap)) return SendClientMessage(playeriderror"Usage: /eedit weapon [slot] [weaponid]");
            if(
wep || wep 3) return SendClientMessage(playeriderror"Weapon slots are between 1 and 3.");
            if(
IsNumeric(weap)) weapid strval(weap); // this line has an error
            
else weapid GetWeaponID(weap);// and this line as well has an error
            
if(weap || weap 46) return SendClientMessage(playeriderror"Invalid weapon ID/Name between [1-46]");
              
GetWeaponName(weapidwnamesizeof(wname));
            switch(
wep)
            {
                case 
1EventWep[0] = weapid;
                case 
2EventWep[1] = weapid;
                case 
3EventWep[2] = weapid;
            }
            
format(stringsizeof(string), " You have set weapon slot %d to %s."wepwname);
            
SendClientMessage(playerid, -1string);
        } 
But i keep getting errors on two lines...

PHP код:
C:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4247) : error 035argument type mismatch (argument 1)
C:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4247) : error 035argument type mismatch (argument 1)
C:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4248) : error 035argument type mismatch (argument 1)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors

Also could someone show me how to read a specific line with y_ini?
Reply


Messages In This Thread
Help with errors and a question - by 1fret - 07.04.2017, 18:58
Re: Help with errors and a question - by X337 - 07.04.2017, 19:08
Re: Help with errors and a question - by XpDeviL - 07.04.2017, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)