warning 204:symbol is assigned a value that is never used - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning 204:symbol is assigned a value that is never used (
/showthread.php?tid=569248)
warning 204:symbol is assigned a value that is never used -
Cancel2 - 29.03.2015
this is the code
Код:
if(!strcmp(cmd,"/gotohint",true))
{
if(PlayerInfo[playerid][pAdmin] <= 6) return SCM(playerid,COLOR_YELLOW2,"Error: Unknown command.");
if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_ALI,"bal lab lala bla!");
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SCM(playerid,COL_SYN,"Syntax: /gotohint <Interior ID(1-27)>");
new numehouse = strval(tmp);
new Float:entx,Float:enty,Float:entz;
new inth,lvlh;
if(numehouse == 1)
{
entx = 2468.365966;
enty = -1698.416625;
entz = 1013.507812;
inth = 2;
lvlh = 12;
}
if(numehouse == 2)
{
entx = 2495.723876;
enty = -1693.244995;
entz = 1014.742187;
inth = 3;
lvlh = 10;
}
if(numehouse == 3)
{
entx = 2233.672363;
enty = -1114.459106;
entz = 1050.882812;
inth = 5;
lvlh = 10;
}
if(numehouse == 4)
{
entx = 2195.893310;
enty = -1204.445678;
entz = 1049.023437;
inth = 6;
lvlh = 10;
}
if(numehouse == 5)
{
entx = 2317.994384;
enty = -1025.836425;
entz = 1050.210937;
inth = 9;
lvlh = 10;
}
if(numehouse == 6)
{
entx = 2260.268310;
enty = -1136.028930;
entz = 1050.632812;
inth = 10;
lvlh = 5;
}
if(numehouse == 7)
{
entx = 235.288238;
enty = 1187.125488;
entz = 1080.257812;
inth = 3;
lvlh = 13;
}
if(numehouse == 8)
{
entx = 225.314559;
enty = 1239.864135;
entz = 1082.140625;
inth = 2;
lvlh = 7;
}
if(numehouse == 9)
{
entx = 222.998306;
enty = 1287.692382;
entz = 1082.140625;
inth = 1;
lvlh = 8;
}
if(numehouse == 10)
{
entx = 226.973403;
enty = 1114.219360;
entz = 1080.996459;
inth = 5;
lvlh = 14;
}
if(numehouse == 11)
{
entx = 295.228607;
enty = 1472.994995;
entz = 1080.257812;
inth = 15;
lvlh = 10;
}
if(numehouse == 12)
{
entx = 447.062316;
enty = 1397.541625;
entz = 1084.304687;
inth = 2;
lvlh = 8;
}
if(numehouse == 13)
{
entx = 226.921157;
enty = 1114.367797;
entz = 1080.996093;
inth = 5;
lvlh = 14;
}
if(numehouse == 14)
{
entx = 260.931701;
enty = 1284.655761;
entz = 1080.257812;
inth = 4;
lvlh = 4;
}
if(numehouse == 15)
{
entx = 24.113548;
enty = 1340.711914;
entz = 1084.375000;
inth = 10;
lvlh = 10;
}
if(numehouse == 16)
{
entx = 221.947799;
enty = 1140.788696;
entz = 1082.609375;
inth = 4;
lvlh = 5;
}
if(numehouse == 17)
{
entx = 2324.500976;
enty = -1148.895507;
entz = 1050.710083;
inth = 12;
lvlh = 12;
}
if(numehouse == 18)
{
entx = 22.807277;
enty = 1403.864746;
entz = 1084.429687;
inth = 5;
lvlh = 7;
}
if(numehouse == 19)
{
entx = 140.445510;
enty = 1366.469726;
entz = 1083.859375;
inth = 5;
lvlh = 15;
}
if(numehouse == 20)
{
entx = 234.098831;
enty = 1064.388549;
entz = 1084.211303;
inth = 6;
lvlh = 15;
}
if(numehouse == 21)
{
entx = 2217.460449;
enty = -1076.410522;
entz = 1050.484375;
inth = 1;
lvlh = 8;
}
if(numehouse == 22)
{
entx = 2365.198974;
enty = -1135.136596;
entz = 1050.875000;
inth = 8;
lvlh = 6;
}
if(numehouse == 23)
{
entx = -42.693019;
enty = 1406.028686;
entz = 1084.429687;
inth = 8;
lvlh = 5;
}
if(numehouse == 24)
{
entx = 2285.795166;
enty = -1137.499755;
entz = 1050.898437;
inth = 11;
lvlh = 3;
}
if(numehouse == 25)
{
entx = 83.098403;
enty = 1322.736083;
entz = 1083.866210;
inth = 9;
lvlh = 12;
}
if(numehouse == 26)
{
entx = 260.850860;
enty = 1238.124633;
entz = 1084.257812;
inth = 9;
lvlh = 10;
}
if(numehouse == 27)
{
entx = 225.625717;
enty = 1022.504638;
entz = 1084.014648;
inth = 7;
lvlh = 15;
}
SetPlayerPos(playerid,entx,enty,entz);
SetPlayerInterior(playerid,inth);
return 1;
}
and i have more Warning:
Код:
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23330) : warning 204: symbol is assigned a value that is never used: "lvlh"
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23608) : warning 204: symbol is assigned a value that is never used: "gheimatasli"
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23611) : warning 204: symbol is assigned a value that is never used: "worldh"
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23601) : warning 204: symbol is assigned a value that is never used: "lvlh"
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23600) : warning 204: symbol is assigned a value that is never used: "inth"
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23599) : warning 204: symbol is assigned a value that is never used: "entz"
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23598) : warning 204: symbol is assigned a value that is never used: "enty"
J:\New folder (2)\roleplayenoob\gamemodes\noobrp.pwn(23597) : warning 204: symbol is assigned a value that is never used: "entx"
the code:
Код:
SetPlayerPos(playerid,entx,enty,entz);
SetPlayerInterior(playerid,inth);
please help me !
Re: warning 204:symbol is assigned a value that is never used -
Sergei - 29.03.2015
Use else if, and add else (without condition) at the end for the cases when numehouse is not one of ones your planned.
Re: warning 204:symbol is assigned a value that is never used -
Cancel2 - 29.03.2015
please example
what i should add ?
Re: warning 204:symbol is assigned a value that is never used -
CalvinC - 29.03.2015
Not sure about the warnings, but you should use a switch instead of 27 if-statements.