array must be indexed
#1

Код:
votekicks.pwn(162) : error 033: array must be indexed (variable "inputtext")
Код:
		if(inputtext == playerid) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR:] {BBBBBB}You Cant Votekick yourself.");
Reply
#2

Quote:
Originally Posted by PowerF
Посмотреть сообщение
Код:
votekicks.pwn(162) : error 033: array must be indexed (variable "inputtext")
Код:
		if(inputtext == playerid) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR:] {BBBBBB}You Cant Votekick yourself.");
if(strlen(inputtext) == playerid)
Reply
#3

deleted
Reply
#4

Quote:
Originally Posted by Lynn
Посмотреть сообщение
if(strlen(inputtext) == playerid)
/votekick

-> Input "player" into the dialog.

pawn Код:
if(6 == playerid)
---------------------------------------------------------------------------------------------------

pawn Код:
if(!IsNumeric(inputtext)) return 1;

new id = strval(inputtext);
if(!IsPlayerConnected(id)) return 1;
if(strval(inputtext) == playerid) ...

stock IsNumeric(const string[]) return !sscanf(string, "{d}");
Reply
#5

Quote:
Originally Posted by Lynn
Посмотреть сообщение
if(strlen(inputtext) == playerid)
strlen => strval

PHP код:
if(strval(inputtext) == playerid
That is correct.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)