array must be indexed
#1

Hello, i would like to ask something, how to fix this, i know it is because the size, but what can i make because it's params?

Код:
    if(params < 1 || params > 20) return SendClientMessage(playerid, -1,""chat""COL_RED" The password must be between 1 and 20!");
Reply
#2

Use strlen to get params length.
Reply
#3

yes, but this wont work with strlen:

Код:
    if(strlen < 1 || strlen > 20) return SendClientMessage(playerid, -1,""chat""COL_RED" The password must be between 1 and 20!");
Reply
#4

https://sampwiki.blast.hk/wiki/Strlen
Reply
#5

are you doing this on OnDialogResponse??
Reply
#6

Код:
if(strlen(params) > 20) return SendClientMessage(playerid, COLOR_GREY, "Maximum character limit is 20.");
Reply
#7

PHP код:
if(strlen(params) < || strlen(params) > 20) { 
    return 
SendClientMessage(playerid, -1COL_RED" The password must be between 1 and 20!");

It seems that you don't even know the basis of programming...
Reply
#8

@Kikito thanks, yes i dont know some things from scripting im not an genie, and i like to ask something, when i dont know how to make it right.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)