A little help here.
#1

Well, there is a small problem.
What I'm trying to do is make a command so when you type /plant it will save that position you are in so later when you type /explode it will create a explosion at that position you saved when you type /plant.

Код:
if (strcmp("/Plant", cmdtext, true, 10) == 0)
	{
    GetPlayerPos(playerid,bombpos); // Here I'm trying to save the bomb pos for the explode part.
	  return 1;
	}
Код:
if (strcmp("/explode", cmdtext, true, 10) == 0)
	{
    CreateExplosion(bombpos, 12, 10.0); // This is suppose to make a explosion at the area bomb pos which was "suppose" to be saved earlier. 

    
	  return 1;
   }
Reply
#2

Somewhere on Top:

pawn Код:
new Float:bombx[MAX_PLAYERS];
new Float:bomby[MAX_PLAYERS];
new Float:bombz[MAX_PLAYERS];
Then on /plant:

pawn Код:
GetPlayerPos(playerid,bombx[playerid],bomby[playerid],bombz[playerid]);
Then on /explode:

pawn Код:
CreateExplosion(bombx[playerid],bomby[playerid],bombz[playerid],12,10.0);

PS: Hi Sal. Remember me?
Reply
#3



Thanks, and yes I remember you.
There are just errors on one line.
Код:
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : error 017: undefined symbol "bombx"
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : warning 215: expression has no effect
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : error 001: expected token: ";", but found "]"
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : error 029: invalid expression, assumed zero
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : fatal error 107: too many error messages on one
Код:
GetPlayerPos(playerid,bombx[playerid],bomby[playerid],bombz[playerid]);
Reply
#4

Код:
error 017: undefined symbol "bombx"
Are you sure you placed the newґs straigt on the top, after the includes?

Код:
error 001: expected token: ";", but found "]"
You probably missed a ; on some other line near 99.

Mind sending me the script part? I could correct it for you.
Reply
#5


That was the problem, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)