12 Warnings - Please Help!
#1

I've noticed IG; that player stats don't save (e.g. Player Position) unless they crash.
I checked the script and found 12 warnings.

Код:
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(2866) : warning 225: unreachable code
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(7250) : warning 204: symbol is assigned a value that is never used: "vehicle"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9422) : warning 204: symbol is assigned a value that is never used: "shealth"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9408) : warning 204: symbol is assigned a value that is never used: "kills"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9405) : warning 204: symbol is assigned a value that is never used: "wanted"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9402) : warning 204: symbol is assigned a value that is never used: "warrests"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9401) : warning 204: symbol is assigned a value that is never used: "crimes"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9400) : warning 204: symbol is assigned a value that is never used: "fishes"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9399) : warning 204: symbol is assigned a value that is never used: "deaths"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(9398) : warning 204: symbol is assigned a value that is never used: "lotto"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(45009) : warning 203: symbol is never used: "PlayerPos"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(45009) : warning 203: symbol is never used: "Turfs"
For the first warning (Unreachable Code) Here's what I have:

Код:
RemoveBuildingForPlayer(playerid, 5031, 2037.0469, -2313.5469, 18.7109, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2089.7813, -2244.4922, 12.7500, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2018.0313, -2224.1641, 12.7500, 0.25);
RemoveBuildingForPlayer(playerid, 1290, 2010.3984, -2207.6172, 18.4219, 0.25);
RemoveBuildingForPlayer(playerid, 1290, 2042.4766, -2207.7031, 18.4219, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2056.8281, -2224.1641, 12.7500, 0.25);
I placed those in the, OnPlayerConnect part - But I think I did so incorrectly. Because IG the objects still remained

and for the second errors (All are practically the same; I'll use the vehicle one in this case)
Код:
	}
	new keycar = PlayerInfo[playerid][pPcarkey];
	new keycar2 = PlayerInfo[playerid][pPcarkey2];
	new keycar3 = PlayerInfo[playerid][pPcarkey3];
	new vehicle = GetPlayerVehicleID(playerid);
	if(IsAnOwnableCar(vehicleid))
	{
Any fixes/solutions?

My Skype is ma_kingz
Reply
#2

For this, You got to place it in OnGameModeInit
pawn Код:
RemoveBuildingForPlayer(playerid, 5031, 2037.0469, -2313.5469, 18.7109, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2089.7813, -2244.4922, 12.7500, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2018.0313, -2224.1641, 12.7500, 0.25);
RemoveBuildingForPlayer(playerid, 1290, 2010.3984, -2207.6172, 18.4219, 0.25);
RemoveBuildingForPlayer(playerid, 1290, 2042.4766, -2207.7031, 18.4219, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2056.8281, -2224.1641, 12.7500, 0.25);
Reply
#3

C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(28 66) : warning 225: unreachable code
Putting an extra bracket.
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(72 50) : warning 204: symbol is assigned a value that is never used: "vehicle"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(94 22) : warning 204: symbol is assigned a value that is never used: "shealth"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(94 0 : warning 204: symbol is assigned a value that is never used: "kills"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(94 05) : warning 204: symbol is assigned a value that is never used: "wanted"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(94 02) : warning 204: symbol is assigned a value that is never used: "warrests"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(94 01) : warning 204: symbol is assigned a value that is never used: "crimes"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(94 00) : warning 204: symbol is assigned a value that is never used: "fishes"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(93 99) : warning 204: symbol is assigned a value that is never used: "deaths"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(93 9 : warning 204: symbol is assigned a value that is never used: "lotto"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(45 009) : warning 203: symbol is never used: "PlayerPos"
C:\Users\Unknown\Desktop\nvm\gamemodes\sagc.pwn(45 009) : warning 203: symbol is never used: "Turfs"

These warnings are nothing to be worried about, that means you didn't use those defines in a function.
You need to assign these defines for something, i bet they occurred when you deleted some code.
Reply
#4

Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
For this, You got to place it in OnGameModeInit
pawn Код:
RemoveBuildingForPlayer(playerid, 5031, 2037.0469, -2313.5469, 18.7109, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2089.7813, -2244.4922, 12.7500, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2018.0313, -2224.1641, 12.7500, 0.25);
RemoveBuildingForPlayer(playerid, 1290, 2010.3984, -2207.6172, 18.4219, 0.25);
RemoveBuildingForPlayer(playerid, 1290, 2042.4766, -2207.7031, 18.4219, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2056.8281, -2224.1641, 12.7500, 0.25);
That will give him errors for Undefined Symbol player id, Duh.
Reply
#5

You are missing a bracket somewhere before OnPLayerConnect or in OnPlayerConnect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)