[HELP] Warnings
#1

Can you help me?

Код:
C:\Documents and Settings\Gustavo\Desktop\samp02Xserver.win32\pawno\include\Seifader.inc(71) : warning 203: symbol is never used: "reason"
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(143) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(42) : warning 204: symbol is assigned a value that is never used: "survivor6"
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(43) : warning 204: symbol is assigned a value that is never used: "survivor7"
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(44) : warning 204: symbol is assigned a value that is never used: "survivor8"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
Код:
#include <a_samp>
#include <Seifader>
#pragma tabsize 0

#define COLOR_BASIC 0xAFAFAFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_DARK_RED 0xAA3333AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLUE 0x0000AA20
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define SURVIVORS 1
#define ZOMBO 2
#define MAX_SPAM 6

new SpamStrings[MAX_PLAYERS];
new locked[MAX_PLAYERS][MAX_VEHICLES];
new survivor1,survivor2,survivor3,survivor4,survivor5,survivor6,survivor7,survivor8;
new zombo1,zombo2,zombo3,zombo4,zombo5;
new gTeam[MAX_PLAYERS];

main()
{
print("\n----------------------------------");
print(" ~ Bio Virus V1.4");
print("----------------------------------\n");
}

public OnGameModeInit()
{
SetGameModeText("Bio Virus V1.4");
Seifader_OnInit();
survivor1 = AddPlayerClassEx(1, 280, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
survivor2 = AddPlayerClassEx(1, 284, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
survivor3 = AddPlayerClassEx(1, 226, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
survivor4 = AddPlayerClassEx(1, 240, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
survivor5 = AddPlayerClassEx(1, 231, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
survivor6 = AddPlayerClassEx(1, 167, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
survivor7 = AddPlayerClassEx(1, 181, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
survivor8 = AddPlayerClassEx(1, 173, 1847.4915,-1664.2227,31.8047,272.8573, 0, 0, 0, 0, 0, 0);
zombo1 = AddPlayerClassEx(2, 272, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
zombo2 = AddPlayerClassEx(2, 70, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
zombo3 = AddPlayerClassEx(2, 27, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
zombo4 = AddPlayerClassEx(2, 147, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
zombo5 = AddPlayerClassEx(2, 165, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
Seifader_OnExit();
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{

if(classid==survivor1){
GameTextForPlayer(playerid,"~r~~h~Survivor",1000,3);
gTeam[playerid] = SURVIVORS;
SetPlayerColor(playerid,COLOR_RED);}

if(classid==survivor2){
GameTextForPlayer(playerid,"~r~~h~Survivor",1000,3);
gTeam[playerid] = SURVIVORS;
SetPlayerColor(playerid,COLOR_RED);}

if(classid==survivor3){
GameTextForPlayer(playerid,"~r~~h~Survivor",1000,3);
gTeam[playerid] = SURVIVORS;
SetPlayerColor(playerid,COLOR_RED);}

if(classid==survivor4){
GameTextForPlayer(playerid,"~r~~h~Survivor",1000,3);
gTeam[playerid] = SURVIVORS;
SetPlayerColor(playerid,COLOR_RED);}

if(classid==survivor5){
GameTextForPlayer(playerid,"~r~~h~Survivor",1000,3);
gTeam[playerid] = SURVIVORS;
SetPlayerColor(playerid,COLOR_RED);}

if(classid==zombo1){
GameTextForPlayer(playerid,"~b~~h~Zombotech",1000,3);
gTeam[playerid] = ZOMBO;
SetPlayerColor(playerid,COLOR_BLUE);}

if(classid==zombo2){
GameTextForPlayer(playerid,"~b~~h~Zombotech",1000,3);
gTeam[playerid] = ZOMBO;
SetPlayerColor(playerid,COLOR_BLUE);}

if(classid==zombo3){
GameTextForPlayer(playerid,"~b~~h~Zombotech",1000,3);
gTeam[playerid] = ZOMBO;
SetPlayerColor(playerid,COLOR_BLUE);}

if(classid==zombo4){
GameTextForPlayer(playerid,"~b~~h~Zombotech",1000,3);
gTeam[playerid] = ZOMBO;
SetPlayerColor(playerid,COLOR_BLUE);}

if(classid==zombo5){
GameTextForPlayer(playerid,"~b~~h~Zombotech",1000,3);
gTeam[playerid] = ZOMBO;
SetPlayerColor(playerid,COLOR_BLUE);}

SetPlayerInterior(playerid,6);SetPlayerFacingAngle(playerid,90);
SetPlayerPos(playerid,349.899993,303.361275,1000.130493);
SetPlayerCameraPos(playerid,346.967376,303.361275,1000);
SetPlayerCameraLookAt(playerid,349.899993,303.361275,1000.130493);
return 1;
}

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Welcome Bio Virus v1.4!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[READ-IT] For commands type /commands !");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[READ-IT] REGISTER AND LOGIN TO SAVE YOUR ACCOUNT SETTINGS !");
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined to Bio Virus/Horror/Zombie v1.4.", pName);
SendClientMessageToAll(COLOR_GREY, string);

if(!strcmp("[ViP]Labrik",pName,true) || !strcmp("netzeek",pName,true) || !strcmp("[MT]Lavis",pName,true))
{
new kstring[128];
format(kstring, sizeof(kstring), "%s was auto kicked from the server (illegal name).", pName);
SendClientMessageToAll(COLOR_GREY, kstring);
print(kstring);
Kick(playerid);
}
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
Seifader_OnPlayerDisconnect(playerid);
new string[128];
new pName[24];
GetPlayerName(playerid, pName, 24);
switch(reason)
{
case 0: format(string, sizeof(string), "%s lost connection to the server. (timeout)", pName);
case 1: format(string, sizeof(string), "%s has left the server.", pName);
case 2: format(string, sizeof(string), "%s has left the server. (kicked)", pName);
}
return 1;
}

public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid ,0);
SetPlayerHealth(playerid, 100);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
FadePlayerScreen(playerid, 0xFFFFFFCC, 192); //playerid, color, time
GameTextForPlayer(playerid,"~w~OMG, CALL THE AMBULANCE!",1000,1);
SendDeathMessage(killerid, playerid, reason);
GameTextForPlayer(killerid,"~r~You Murderer!",4000,3);
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
SpamStrings[playerid] ++;
if(SpamStrings[playerid] >= MAX_SPAM)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
printf("(previous text of %s was blocked by antispam)", PlayerName);
SendClientMessage(playerid,0xCC0000AA,"Please wait 20 seconds before you spam again (spam protection).");
return 0;
}
new textstring[128];
format(textstring, sizeof(textstring), "[%i] %s", playerid, text);
SendPlayerMessageToAll(playerid, textstring);
return 0;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/parachute", true) == 0)
{
GivePlayerWeapon(playerid, 46, 1);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Use it well!");
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
return 1;
}

if(strcmp(cmdtext, "/flip", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:PX, Float:PY, Float:PZ, Float:PA;
GetPlayerPos(playerid, PX, PY, PZ);
GetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
SetVehiclePos(GetPlayerVehicleID(playerid), PX, PY, PZ+1);
SetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
SendClientMessage(playerid, COLOR_GREEN,"Vehicle Fliped!");
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Can you flip your self?");
}
return 1;
}

if(strcmp(cmdtext, "/lock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You can only lock the doors as the driver.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vehicle locked!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
PlayerPlaySound(playerid, 1137,pX,pY,pZ);
locked[playerid][GetPlayerVehicleID(playerid)] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "You're not in a vehicle!");
}
return 1;
}

if(strcmp(cmdtext, "/unlock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You can only lock the doors as the driver.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vehicle unlocked!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid, 1058,pX,pY,pZ);
locked[playerid][GetPlayerVehicleID(playerid)] = 0;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You're not in a vehicle!");
}
return 1;
}

if(strcmp(cmdtext, "/commands", true)==0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "CARS: /lock /unlock /flip");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "OTHER: /parachute");
return 1;
}
return 0;
}

public OnPlayerScreenFade(playerid, color, speed)
{
  return 1;
}

public OnPlayerScreenColorFade(playerid, color, speed)
{
  return 1;
}
Help ?
Reply
#2

Код:
C:\Documents and Settings\Gustavo\Desktop\samp02Xserver.win32\pawno\include\Seifader.inc(71) : warning 203: symbol is never used: "reason"
This means, you do not write something in or read form 'reason', so you can delete it or turn it to comment

Код:
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(143) : warning 202: number of arguments does not match definition
Means there is not the number or parameters as defined, easiest is to check it to check the syntax in the wiki or, if you made the function, check it with the parameters you defined. IF you cant find the error, post the line here

Код:
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(42) : warning 204: symbol is assigned a value that is never used: "survivor6"
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(43) : warning 204: symbol is assigned a value that is never used: "survivor7"
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(44) : warning 204: symbol is assigned a value that is never used: "survivor8"
Basically the same as the first warning, something is written into these variables, but you never read from them, so you can leave them and the lines you write into them out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)