Help me :D
#1

I'm trying to make a /shout command but i get these errors,

Код:
(481) : error 010: invalid function or declaration
(483) : error 001: expected token: ";", but found "-identifier-"
(486) : error 010: invalid function or declaration
NOTE: i took out folder name.

Here's my /shout command

Код:
	if(strcmp("/shout",cmdtext, true, 3))
	new stringz[128]
	GetPlayerName(playerid, stringz, sizeof(stringz));
	format(stringz, sizeof(stringz), "[SHOUT]%s: %s", stringz, cmdtext[4]);
	SendClientMessageToAll(COLOR_WHITE, stringz);
		return 1;
	}
Reply
#2

Quote:
Originally Posted by coole210
I'm trying to make a /shout command but i get these errors,

Код:
(481) : error 010: invalid function or declaration
(483) : error 001: expected token: ";", but found "-identifier-"
(486) : error 010: invalid function or declaration
NOTE: i took out folder name.

Here's my /shout command

Код:
	if(strcmp("/shout",cmdtext, true, 3))
	new stringz[128]
	GetPlayerName(playerid, stringz, sizeof(stringz));
	format(stringz, sizeof(stringz), "[SHOUT]%s: %s", stringz, cmdtext[4]);
	SendClientMessageToAll(COLOR_WHITE, stringz);
		return 1;
	}
you miss a '{' and one ';'


Код:
	if(strcmp("/shout",cmdtext, true, 3))
    {
	new stringz[128];
	GetPlayerName(playerid, stringz, sizeof(stringz));
	format(stringz, sizeof(stringz), "[SHOUT]%s: %s", stringz, cmdtext[4]);
	SendClientMessageToAll(COLOR_WHITE, stringz);
		return 1;
	}
Reply
#3

Thank you but i have another problem...

Код:
	if(strcmp("/kill",cmdtext,true) == 0)
	SetPlayerHealth(playerid,0);
	SendClientMessage(playerid, COLOR_RED, "You have killed yourself.");
return 1;
}

return 0;
}
It says the
Код:
return 0;
is a
Код:
(477) : error 010: invalid function or declaration
Reply
#4

pawn Код:
if(strcmp("/kill",cmdtext,true) == 0)
   {
      SetPlayerHealth(playerid,0);
      SendClientMessage(playerid, COLOR_RED, "You have killed yourself.");
      return 1;
   }
return 0;
}
Reply
#5

your forgetting the {'s
Reply
#6

Okay again a thing i need :P

I made this money system called "Tcash" just like "Rcash" from West-Side RPG it saves with my /register and /login command but i don't know how to make it so score = Tcash !

Can somebody tell me a code on how to make TCASH into score?

Reply
#7

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) { SetPlayerScore(i, tcash[i] /*?*/); }
Reply
#8

Quote:
Originally Posted by Pandabeer1337
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) { SetPlayerScore(i, tcash[i] /*?*/); }
For tcash[i] should i put GetPlayerTcash[i] instead?

I have these commands :

Код:
GivePlayerTcash(playerid, tcash)
ResetPlayerTcash(playerid)
GetPlayerTcash(playerid)
Reply
#9

Quote:
Originally Posted by coole210
Quote:
Originally Posted by Pandabeer1337
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) { SetPlayerScore(i, tcash[i] /*?*/); }
For tcash[i] should i put GetPlayerTcash[i] instead?

I have these commands :

Код:
GivePlayerTcash(playerid, tcash)
ResetPlayerTcash(playerid)
GetPlayerTcash(playerid)
yes if you made that by yourself than you could do this:

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) { SetPlayerScore(i, GetPlayerTcash(i)); }
Reply
#10

TYVM Ill tell you if i have another problem xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)