Help with /me command with weapon name
#1

this is the code:
PHP код:
GivePlayerGun(playeriddini_Int(CarFile(cehcar),"Slot1W"), dini_Int(CarFile(cehcar),"Slot1B"));
new 
gunid dini_Int(CarFile(cehcar),"Slot1W");
new 
string[256];
new 
gunname GetWeaponName(gunid,256);
format(stringsizeof(string), "%s"gunname);
mecmd(playeridstring);
dini_IntSet(CarFile(cehcar),"Slot1W",0); 
The error is:
PHP код:
C:\Users\G\Desktop\G\mode\server\gamemodes\1.pwn(12580) : error 035argument type mismatch (argument 2
Reply
#2

PUT THE WHOLE THING, SHOULD ME AROUND 1-10 lines
Reply
#3

You should post line 12580.
Reply
#4

The correct usage for the function GetWeaponName is GetWeaponName(weaponid, const weapon[], len);
also you don't save values that has characters in an integer variable, anyway...
Replace this..

pawn Код:
new gunname = GetWeaponName(gunid, 256);
with this..

pawn Код:
new gunname[32];
GetWeaponName(gunid, gunname, sizeof(gunname));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)