faction create object help
#1

Hi I was searching around trying to find a code that would allow me to place reflectve cones around with the createobject /cone cmd

I found a code someone posted and I've tried it. But I keep getting error messages. Also it's not setup for a faction only I don't think. If someone could help me out with that...

C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(490 : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(490 : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(490 : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5359) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5359) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5359) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5371) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5371) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5371) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(6631) : error 017: undefined symbol "bCreateInfo"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(6631) : error 017: undefined symbol "Model"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(6631) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(6631) : fatal error 107: too many error messages on one line


Quote:

{
#define MAX_CONES (25)


new Cone[MAX_CONES];
new ConeCounter;
}
if(!strcmp(cmdtext, "/cone", true))
{
if(ConeCounter == MAX_CONES) return SendClientMessage(playerid, COLOR_RED, "Cone Limit reached");
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
Cone[ConeCounter++] = CreateObject(1237, X, Y, Z, 0.0, 0.0, A);
SetPlayerPos(playerid, X+3, Y+3, Z+3);
return SendClientMessage(playerid, COLOR_GREEN, "Reflective Cone Successfully Deployed");
}
if(!strcmp(cmdtext, "/removecones", true))
{
for(new i = 0; i <= ConeCounter; i++) DestroyObject(Cone[i]);
ConeCounter = 0;
return SendClientMessage(playerid, COLOR_GREEN, "Cones have been picked up.");
}

I'm also just testing it out on the gf script. I'm just trying to learn how to script by vieing other samples....
Reply
#2

I've changed some things around and found out that some errors were being caused by other things in the script....

Here's the new set of errors....


C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(490 : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(490 : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(490 : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5359) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5359) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5359) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5371) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5371) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(5371) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(1549 : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(1549 : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(1549 : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(16653) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(16653) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(16653) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22282) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22282) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22282) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22955) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22955) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22955) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22996) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22996) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(22996) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(23045) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(23045) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(23045) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(2623 : error 055: start of function body without function header
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26241) : error 054: unmatched closing brace ("}")
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26242) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26244) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26246) : error 021: symbol already defined: "GetPlayerPos"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26250) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26252) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26254) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(26256) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(2625 : warning 203: symbol is never used: "A"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(2625 : warning 203: symbol is never used: "Cone"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(2625 : warning 203: symbol is never used: "ConeCounter"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(2625 : warning 203: symbol is never used: "X"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(2625 : warning 203: symbol is never used: "Y"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\gf.pwn(2625 : warning 203: symbol is never used: "Z"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)