HELP PLZ FAST NOW HELP!!!!!!!!!!!Pawn Warnings
#1

Код:
warning 204: symbol is assigned a value that is never used: "shealth"
The lines where "shealth" is used:
Код:
		/*new costlevel = nxtlevel*levelcost;//10k for testing purposes*/
		new Float:shealth = PlayerInfo[targetid][pSHealth];
		new Float:health;
		new name[MAX_PLAYER_NAME];
		GetPlayerName(targetid, name, sizeof(name));
		GetPlayerHealth(targetid,health);
		new Float:px,Float:py,Float:pz;
		GetPlayerPos(targetid, px, py, pz);
		new coordsstring[2048],coordsstringA[256],coordsstringB[256],coordsstringC[256],coordsstringD[256],coordsstringE[256];
    	format(coordsstringA, sizeof(coordsstringA), "{00CCFF}Ime:[%s] \n{00CCFF}Level:[%d] \n{FFFF00}Spol:[%s] \n{00CCFF}Starost:[%d] \n{FFFF00}Drzava:[%s]\n\n  Novaca:[$%d]\n{00CCFF}Bank:[$%d] \n{FFFF00}Br. moba:[%d]", name, level, atext, age, otext, cash, account, pnumber);
		format(coordsstringB, sizeof(coordsstringB), "\n\n{00CCFF}Donator Bodova:[%d] \n{FFFF00}Bracno stanje:[%s] \n{00CCFF}Sati igranja:[%d] \n{FFFF00}PayDay:[%d/30]", donator,married,ptime,igra);
		format(coordsstringC, sizeof(coordsstringC), "\n\n{00CCFF}Pocinjeni zlocini:[%d] \n{FFFF00}Vrijeme u zatvoru:[%d] \n{00CCFF}Posao:[%s] \n{FFFF00}Mobitel Bon:[%d] ", crimes,arrests,jtext,bon);
        format(coordsstringD, sizeof(coordsstringD), "\n\n{00CCFF}Ubojstva:[%d] \n{FFFF00}Smrti:[%d] \n{00CCFF}Respect:[%d/%d] \n{FFFF00}Obitelj:[%s] \n{00CCFF}Kredit iznos: [%d]",kills,deaths,exp,expamount,f2text,kredit);
		format(coordsstringE, sizeof(coordsstringE), "\n\n{00CCFF}Droge:[%d] \n{FFFF00}Materijali:[%d] \n{00CCFF}Bolest:[%s] \n{FFFF00}Organizacija:[%s] \n{00CCFF}Rank:[%s]",drugs,mats,dtext,ttext,rtext);
	    format(coordsstring, sizeof(coordsstring), "%s\n%s\n%s\n%s\n%s",coordsstringA,coordsstringB,coordsstringC,coordsstringD,coordsstringE);
	    ShowPlayerDialog(playerid,842,DIALOG_STYLE_MSGBOX,"|----------|{FF0000}Zivot Igraca|----------|{3300FF}Stats|----------||----------| Zivot Igraca|----------|Stats|----------||----------| Zivot Igraca|----------|Stats|----------||----------| Zivot Igraca|----------|Stats|----------|",coordsstring,"OK","Odustani");

	}
}
There is one more:
Код:
warning 204: symbol is assigned a value that is never used: "gun"
The lines:
Код:
				else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
				{
					gun = 33; guncharge = GunPrice[24][0]/100*mod; ammocharge = GunPrice[29][0]*ammo;
					PlayerInfo[playerid][pGun4] = 33; PlayerInfo[playerid][pAmmo4] = ammo;
				}
				else
				{
Can I delete the "shealth" line??
What to do whit that "gun" line??
Reply
#2

Yes you can delete them since they are not being used. I thought this was common sense.
Reply
#3

1) Yes, you can delete the SHealth , caz you dont use it in this script...
2) you can delete it to...

1+2 explane what you want to do with those scripts... so we can understand better and help you...
Reply
#4

You can delete it or use :
pawn Код:
#pragma unused shealth
#pragma unused gun
Add that on top of your script or bottom of your script.
Reply
#5

Thanks!Yes but Im not sure about to delete the "gun" line because if I delete the "gun" line I will not be able to select this weapon InGame................and this is Rifle Here are the all guns and all works fine except Rifle....Can I fix that warning?
Код:
new ammo = strval(tmp);
				if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, "   Municija nemoze biti manja od 1 ili veca od 999 !"); return 1; }
				if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
				{
					gun = 46;
					guncharge = GunPrice[0][0]/100*mod;
					ammocharge = 0;
				}
				else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
				{
					gun = 2; guncharge = GunPrice[1][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 2; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
				{
					gun = 3; guncharge = GunPrice[2][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 3; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
				{
					gun = 5; guncharge = GunPrice[4][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 5; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
				{
					gun = 6; guncharge = GunPrice[5][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 6; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
				{
					gun = 7; guncharge = GunPrice[6][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 7; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
				{
					gun = 10; guncharge = GunPrice[7][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 10; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
				{
					gun = 11; guncharge = GunPrice[8][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 11; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
				{
					gun = 12; guncharge = GunPrice[9][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 12; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
				{
					gun = 13; guncharge = GunPrice[10][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 13; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
				{
					gun = 14; guncharge = GunPrice[11][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 14; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
				{
					gun = 15; guncharge = GunPrice[12][0]/100*mod; ammocharge = 0;
					PlayerInfo[playerid][pGun1] = 15; PlayerInfo[playerid][pAmmo1] = 1;
				}
				else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0)
				{
					gun = 23; guncharge = GunPrice[13][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
					PlayerInfo[playerid][pGun2] = 23; PlayerInfo[playerid][pAmmo2] = ammo;
				}
				else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0)
				{
					gun = 24; guncharge = GunPrice[15][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
					PlayerInfo[playerid][pGun2] = 24; PlayerInfo[playerid][pAmmo2] = ammo;
				}
				else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
				{
					gun = 29; guncharge = GunPrice[18][0]/100*mod; ammocharge = GunPrice[27][0]*ammo;
					PlayerInfo[playerid][pGun3] = 29; PlayerInfo[playerid][pAmmo3] = ammo;
				}
				else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
				{
					gun = 25; guncharge = GunPrice[19][0]/100*mod; ammocharge = GunPrice[26][0]*ammo;
					PlayerInfo[playerid][pGun3] = 25; PlayerInfo[playerid][pAmmo3] = ammo;
				}
				else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
				{
					gun = 30; guncharge = GunPrice[22][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
					PlayerInfo[playerid][pGun4] = 30; PlayerInfo[playerid][pAmmo4] = ammo;
				}
				else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
				{
					gun = 31; guncharge = GunPrice[23][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
					PlayerInfo[playerid][pGun4] = 31; PlayerInfo[playerid][pAmmo4] = ammo;
				}
				else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
				{
					gun = 33; guncharge = GunPrice[24][0]/100*mod; ammocharge = GunPrice[29][0]*ammo;
					PlayerInfo[playerid][pGun4] = 33; PlayerInfo[playerid][pAmmo4] = ammo;
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD6, "Cuvar kaћe: Nikad nisam cuo za to oruћje.");
					return 1;
				}
				if((guncharge+ammocharge) > JB_GetPlayerMoney(playerid))
				{
					format(infostring, 256, "   Nemas $%d !",guncharge+ammocharge);
					SendClientMessage(playerid, COLOR_GRAD3, infostring);
					return 1;
				}
				if(JB_GetPlayerMoney(playerid) < (guncharge+ammocharge))
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Nemoћeљ si to priuљtiti !");
				    return 1;
				}
				new payout = guncharge + ammocharge;
				format(infostring, 256, "Kupio si %s sa %d metaka za $%d",gunid,ammo,payout);
				SendClientMessage(playerid, COLOR_GRAD3, infostring);
				if(location == 102 && IsACop(playerid)) { }
				else { JB_GivePlayerMoney(playerid, - payout); }

				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				JB_GivePlayerWeapon(playerid, gun, ammo);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "%s je kupio oruћje $%d u biznisu %d", sendername, payout, location-99);
				printf("%s", string);
				PayLog(string);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_WHITE,"{00CCFF}Black Street Rolelpay:{FF0000} Nisi u ducanu.");
				return 1;
			}
		}
		return 1;
	}
Reply
#6

Just remove "new gun etc.." and check if the script gives errors, if so please post em'.
Reply
#7

Thank you all for helping me!!
Reply
#8

No problem, glad I helped you.
Reply
#9

Quote:
Originally Posted by expertprogrammer
Посмотреть сообщение
No problem, glad I helped you.
LoL...
what he sayed *laughs*
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)