Delete gate option isn't working.
#1

Hello, I have added few new options to my gate system "Delete"

But I'm getting warning and that option isn't working can anyone tell me what is wrong here??


PHP код:
else if(strcmp(x_job"delete"true) == 0)
        {
        
26451>    for(new gateidgateid MAX_GATESgateid++)
            
GateInfo[gateid][gPosX] = 10000.0;
            
GateInfo[gateid][gPosY] = 10000.0;
            
GateInfo[gateid][gPosZ] = 10000.0;
            
GateInfo[gateid][gRotX] = 10000.0;
            
GateInfo[gateid][gRotY] = 0.0;
            
GateInfo[gateid][gRotZ] = 0.0;
            
GateInfo[gateid][gPosXM] = 0.0;
            
GateInfo[gateid][gPosYM] = 0.0;
            
GateInfo[gateid][gPosZM] = 0.0;
            
GateInfo[gateid][gRotXM] = 0.0;
            
GateInfo[gateid][gRotYM] = 0.0;
            
GateInfo[gateid][gRotZM] = 0.0;
            
GateInfo[gateid][gModel] = 0;
            
GateInfo[gateid][gVW] = 0;
            
GateInfo[gateid][gInt] = 0;
            
GateInfo[gateid][gHID] = INVALID_HOUSE_ID;
            
GateInfo[gateid][gPass] = 0;
            if(
IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            
CreateGate(gateid);
    
26472>        SaveGates(gateid);
            
Log("logs/gedit.log"string);
        } 
Warnings:

Код:
gamemodes\Roleplay.pwn(26451) : warning 219: local variable "gateid" shadows a variable at a preceding level
gamemodes\Roleplay.pwn(26472) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#2

"gateid" has been declared either at the top of the command or as global.

About the warning with wrong number of arguments, look at the parameters of the said function.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
"gateid" has been declared either at the top of the command or as global.

About the warning with wrong number of arguments, look at the parameters of the said function.
Thanks for your help. I have fixed the problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)