13.06.2012, 06:39
Hello!
Im making new gm and im having problem to compare input text.
I want to make, when player file dosnґt exist, than he must put server password before he can continue registration.
I have made:
i got error:
I dont understand how i must put it that it compare input text and server password
Im making new gm and im having problem to compare input text.
I want to make, when player file dosnґt exist, than he must put server password before he can continue registration.
I have made:
Код:
#define ServeriParool "prooviparool" // defined server password public OnPlayerConnect(playerid) // When player connects { if (PlayerFile_Load(playerid) == 1) // Is player file exist { ShowPlayerDialog(playerid, Dialoog_Sisselogimine, DIALOG_STYLE_PASSWORD, "Tere tulemast tagasi", "Sisesta parool et laadida enda kasutaja", "Logi Sisse", "Loobu"); // Show player login dialog } else // else if player file dont exist ShowPlayerDialog(playerid, Dialoog_RegFoorumistLoetud, DIALOG_STYLE_INPUT, "TERE TULEMAST MEIE SERVERISSE!", "Sisesta serveri parool", "Jдtka", "Loobu"); // Show player dialog server password return 1; } // In dialog response case Dialoog_RegFoorumistLoetud: // dialog server password { switch (response) { case 1: { if(strlen(inputtext) == ServeriParool) // If input text and server password is true { ShowPlayerDialog(playerid, Dialoog_RegFoorumistLoetudOk, DIALOG_STYLE_MSGBOX,"PAROOL ХIGE", "TUBLI! OLED ILUSASTI FOORUMIST KХIK LДBI LUGENUD JA NХUSTUNUD TINGIMUSTEGA. \n\ JДTKAME NЬЬD REGISTREERIMISEGA", "JДTKA"}; // When password is ok, show next dialog } else { SendClientMessage(playerid, 0xFFFFFFFF, "Et jдtkata registreerumist mine loe foorumist reeglite kohta ja saad parooli mida siia sisestama pead"); Kick(playerid); // Else send client message to player that he/she must go to forum and get the server password } } } }
Код:
C:\Users\Geto244\Desktop\MyGm\gamemodes\MyGM.pwn(330) : error 033: array must be indexed (variable "-unknown-")