Object problem
#1

I wanted to make a cmd when i write /block that an object creates near me and when i type removeblock that it removes but i dont know how to make that. Here is the code.

new block;

If(strcmp(cmdtext,"/removeblock",true)

DestroyObject(block);
return 1;

//----------------------------[Block]-------------------------------------------

if(strcmp(cmdtext,"/block",true)==0)
if(gTeam[playerid] == TEAM_ARMY)
new Float, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateObject(block,981,x,y,z);
else
}
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You need to be army if you want to use this command");

//CreateObject(981, 2266.821533, -1591.052002, 3.209601, 0.0000, 0.0000, 270.0000);



return 1;
}
return 0;
}






D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(112 : warning 225: unreachable code
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1130) : error 003: declaration of a local variable must appear in a compound block
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1130) : warning 221: label name "Float" shadows tag name
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1130) : error 017: undefined symbol "x"
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1130) : warning 215: expression has no effect
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1131) : error 017: undefined symbol "x"
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1132) : error 017: undefined symbol "x"
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1133) : error 029: invalid expression, assumed zero
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1130) : warning 203: symbol is never used: "Float"
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\gamemodes\abcd.pwn(1130 -- 1143) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply


Messages In This Thread
Object problem - by Frankox - 12.07.2009, 15:57
Re: Object problem - by member - 12.07.2009, 16:32
Re: Object problem - by yom - 12.07.2009, 16:34
Re: Object problem - by member - 12.07.2009, 16:38
Re: Object problem - by Frankox - 12.07.2009, 17:28
Re: Object problem - by Frankox - 12.07.2009, 17:33
Re: Object problem - by yom - 12.07.2009, 18:10
Re: Object problem - by Frankox - 12.07.2009, 18:27

Forum Jump:


Users browsing this thread: 1 Guest(s)