AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help w/ plugin . (https://forums.alliedmods.net/showthread.php?t=135918)

buklaokid 08-20-2010 22:16

help w/ plugin .
 
PHP Code:

copyBlock(ent)
{
    
//if entity is valid
    
if (is_valid_ent(ent))
    {
        new 
Float:vOrigin[3];
        new 
Float:vAngles[3];
        new 
Float:vSizeMin[3];
        new 
Float:vSizeMax[3];
        new 
Float:fMax;
        new 
blockType;
        new 
size;
        new 
axis;
        new 
szCreator[32];

        
get_user_name(idszCreator31);
        
replace_all(szCreator31" ""_");
        
        
//get blocktype and origin of currently grabbed block
        
blockType entity_get_int(entEV_INT_body);
        
entity_get_vector(entEV_VEC_originvOrigin);
        
entity_get_vector(entEV_VEC_anglesvAngles);
        
entity_get_vector(entEV_VEC_minsvSizeMin);
        
entity_get_vector(entEV_VEC_maxsvSizeMax);
        
        
//work out the block size
        
size SMALL;
        
fMax vSizeMax[0] + vSizeMax[1] + vSizeMax[2];
        if (
fMax 64.0size NORMAL;
        if (
fMax 128.0size LARGE;
        
        
//work out the axis orientation
        
for (new 03; ++i)
        {
            if (
vSizeMax[i] == 4.0)
            {
                
axis i;
                break;
            }
        }
        
        
//create a block of the same type in the same location
        
return createBlock(0blockTypevOriginaxissizeszCreator);
    }
    
    return 
0;


All the errors are on the same line.

Quote:

error 017: undefined symbol "id"
warning 215: expression has no effect.
warning 215: expression has no effect.
error 001 token: ';" but found ">"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

HLM 08-20-2010 22:23

Re: help w/ plugin .
 
PHP Code:

get_user_name(idszCreator31); 

id -> ent

buklaokid 08-20-2010 22:30

Re: help w/ plugin .
 
I made
PHP Code:

copyBlock(ent) -> copyBlock(ident

Now on
PHP Code:

case 'D'createBlock(0BM_HEALERvVec1axissizeszCreator); 

It gives me.. error 035: argument type mismatch <argument 5>

HLM 08-20-2010 23:28

Re: help w/ plugin .
 
do you have a #define SMALL at the top of the plugin? if you dont, your problem is coming from
PHP Code:

//work out the block size
        
size SMALL

if you do have a define, then this is above me

buklaokid 08-21-2010 00:55

Re: help w/ plugin .
 
If I add #define SMALL on the top ; it'd give me more errors.


All times are GMT -4. The time now is 21:54.

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