Raised This Month: $ Target: $400
 0% 

Symbol is assigned a value that is never used: "ent"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mandiii
Junior Member
Join Date: Jun 2010
Old 06-12-2010 , 18:20   Symbol is assigned a value that is never used: "ent"
Reply With Quote #1

Cant seem to find a way to solve it.

PHP Code:
loadBlocks(id)
{
    new 
ent;

    new 
bool:bAccess false;
    
    
//if this function was called on map load, ID is 0
    
if (id == 0)
    {
        
bAccess true;
    }
    
//make sure user calling this function has access
    
else if (get_user_flags(id) & BM_ADMIN_LEVEL)
    {
        
bAccess true;
    }
    
    if (
bAccess)
    {
        
//if map file exists
        
if (file_exists(gszNewFile))
        {
            
//if a player is loading then first delete all the old blocks, teleports and timers
            
if (id && id <= 32)
            {
                
deleteAllBlocks(idfalse);
                
deleteAllTeleports(idfalse);
                
deleteAllTimers(idfalse);
            }
            
            new 
szData[128];
            new 
szType[2];
            new 
sz1[16], sz2[16], sz3[16], sz4[16], sz5[16], sz6[16], sz7[16];
            new 
Float:vVec1[3];
            new 
Float:vVec2[3];
            new 
axis;
            new 
size;
            new 
fopen(gszNewFile"rt");
            new 
blockCount 0;
            new 
teleCount 0;
            new 
timerCount 0;
            new 
bool:bTimerStart true;
            new 
Float:vTimerOrigin[3];
            new 
Float:vTimerAngles[3];
            
            
//iterate through all the lines in the file
            
while (!feof(f))
            {
                
szType "";
                
fgets(fszData128);
                
parse(szDataszType1sz116sz216sz316sz416sz516sz616sz716);
                
                
vVec1[0] = str_to_float(sz1);
                
vVec1[1] = str_to_float(sz2);
                
vVec1[2] = str_to_float(sz3);
                
vVec2[0] = str_to_float(sz4);
                
vVec2[1] = str_to_float(sz5);
                
vVec2[2] = str_to_float(sz6);
                
size str_to_num(sz7);
                
                if (
strlen(szType) > 0)
                {
                    
//if type is not a teleport
                    
if (szType[0] != gTeleportSaveId)
                    {
                        
//set axis orientation depending on block angles
                        
if (vVec2[0] == 90.0 && vVec2[1] == 0.0 && vVec2[2] == 0.0)
                        {
                            
axis X;
                        }
                        else if (
vVec2[0] == 90.0 && vVec2[1] == 0.0 && vVec2[2] == 90.0)
                        {
                            
axis Y;
                        }
                        else
                        {
                            
axis Z;
                        }
                        
                        
//increment block counter
                        
++blockCount;
                    }
                    
                    
//create block or teleport depending on type
                    
switch (szType[0])
                    {
                        case 
'A'ent createBlock(0BM_PLATFORMvVec1axissize);
                        case 
'B'ent createBlock(0BM_BHOPvVec1axissize);
                        case 
'C'ent createBlock(0BM_DAMAGEvVec1axissize);
                        case 
'D'ent createBlock(0BM_HEALERvVec1axissize);
                        case 
'E'ent createBlock(0BM_INVINCIBILITYvVec1axissize);
                        case 
'F'ent createBlock(0BM_STEALTHvVec1axissize);
                        case 
'G'ent createBlock(0BM_TRAMPOLINEvVec1axissize);
                        case 
'H'ent createBlock(0BM_SPEEDBOOSTvVec1axissize);
                        case 
'I'ent createBlock(0BM_NOFALLDAMAGEvVec1axissize);
                        case 
'J'ent createBlock(0BM_ICEvVec1axissize);
                        case 
'K'ent createBlock(0BM_DEATHvVec1axissize);
                        case 
'L'ent createBlock(0BM_HEvVec1axissize);
                        case 
'M'ent createBlock(0BM_CAMOUFLAGEvVec1axissize);
                        case 
'N'ent createBlock(0BM_LOWGRAVITYvVec1axissize);
                        case 
'O'ent createBlock(0BM_FIREvVec1axissize);
                        case 
'P'ent createBlock(0BM_SLAPvVec1axissize);
                        case 
'Q'ent createBlock(0BM_RANDOMvVec1axissize);
                        case 
'R'ent createBlock(0BM_HONEYvVec1axissize);
                        case 
'S'ent createBlock(0BM_BARRIER_CTvVec1axissize);
                        case 
'T'ent createBlock(0BM_BARRIER_TvVec1axissize);
                        case 
'U'ent createBlock(0BM_BOOTSOFSPEEDvVec1axissize);
                        case 
'V'ent createBlock(0BM_GLASSvVec1axissize);
                        case 
'W'ent createBlock(0BM_BHOP_NOSLOWvVec1axissize);
                        case 
'X'ent createBlock(0BM_DUCKvVec1axissize);
                        case 
'Y'ent createBlock(0BM_ASSvVec1axissize);
                        case 
'Z'ent createBlock(0BM_SALTOvVec1axissize);
                        case 
'1'ent createBlock(0BM_FROSTvVec1axissize);
                        case 
'2'ent createBlock(0BM_FLASHvVec1axissize);
                        case 
'3'ent createBlock(0BM_DELAYEDvVec1axissize);
                        case 
'4'ent createBlock(0BM_MONEYvVec1axissize);
                        case 
'5'ent createBlock(0BM_DEAGLEvVec1axissize);
                        case 
'6'ent createBlock(0BM_AWPvVec1axissize);
                        case 
'7'ent createBlock(0BM_GRAVITYvVec1axissize);
                        case 
'8'ent createBlock(0BM_BLINDvVec1axissize);
                        case 
'9'ent createBlock(0BM_BLINDFASTvVec1axissize);
                        case 
'a'ent createBlock(0BM_SGvVec1axissize);
                        case 
'b'ent createBlock(0BM_SUPERHEALvVec1axissize);
                        case 
'c'ent createBlock(0BM_SUPERHONEYvVec1axissize);
                        case 
'd'ent createBlock(0BM_COLTvVec1axissize);
                        case 
'e'ent createBlock(0BM_SUPERMONEYvVec1 ,axissize);
                        
                        case 
gTeleportSaveId:
                        {
                            
createTeleport(0TELEPORT_STARTvVec1);
                            
createTeleport(0TELEPORT_ENDvVec2);
                            
                            
//increment teleport count
                            
++teleCount;
                        }
                        
                        case 
gTimerSaveId:
                        {
                            
//is this the first timer info retrieved from file?
                            
if (bTimerStart)
                            {
                                
//store start timer info
                                
vTimerOrigin[0] = vVec1[0];
                                
vTimerOrigin[1] = vVec1[1];
                                
vTimerOrigin[2] = vVec1[2];
                                
vTimerAngles[0] = vVec2[0];
                                
vTimerAngles[1] = vVec2[1];
                                
vTimerAngles[2] = vVec2[2];
                                
                                
//the next timer to come along is the end of the timer
                                
bTimerStart false;
                            }
                            else
                            {
                                
//create the start of timer
                                
createTimer(0TIMER_STARTvTimerOriginvTimerAngles);
                                
                                
//create the end of the timer
                                
createTimer(0TIMER_ENDvVec1vVec2);
                                
                                
//if another timer comes along then it'll be the start again
                                
bTimerStart true;
                                
                                
//increment timer count
                                
++timerCount;
                            }
                        }
                        
                        default:
                        {
                            
log_amx("%sInvalid block type: %c in: %s"gszPrefixszType[0], gszFile);
                            
                            
//decrement block counter because a block was not created
                            
--blockCount;
                        }
                    }
                }
            }
            
            
fclose(f);
            
            
//if a player is loading the blocks
            
if (id && id <= 32)
            {
                
//get players name
                
new szName[32];
                
get_user_name(idszName32);
                
                
//notify all admins that the player loaded blocks from file
                
for (new 1<= 32; ++i)
                {
                    
//make sure player is connected
                    
if (is_user_connected(i))
                    {
                        if (
get_user_flags(i) & BM_ADMIN_LEVEL)
                        {
                            
client_print(iprint_chat"%s'%s' loaded %d block%s, %d teleporter%s and %d timer%s! Total entites in map: %d"gszPrefixszNameblockCount, (blockCount == "" "s"), teleCount, (teleCount == "" "s"), timerCount, (timerCount == "" "s"), entity_count());
                        }
                    }
                }
            }
        }
        else
        {
            
//if a player is loading the blocks
            
if (id && id <= 32)
            {
                
//notify player that the file could not be found
                
client_print(idprint_chat"%sCouldn't find file: %s"gszPrefixgszNewFile);
            }
        }
    }

Mandiii is offline
Old 06-12-2010, 18:22
5c0r-|3i0
This message has been deleted by 5c0r-|3i0. Reason: wait...
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-12-2010 , 21:23   Re: Symbol is assigned a value that is never used: "ent"
Reply With Quote #3

Remove
PHP Code:
new ent
and all of the ent ='s before each createBlock().
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode