SA-MP Forums Archive
error 033: array must be indexed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 033: array must be indexed (/showthread.php?tid=394817)



error 033: array must be indexed - benel1 - 24.11.2012

pawn Код:
C:\Users\аод\Desktop\Server\gamemodes\benel2.pwn(3849) : error 033: array must be indexed (variable "DOF2_GetString")
C:\Users\аод\Desktop\Server\gamemodes\benel2.pwn(3850) : error 033: array must be indexed (variable "DOF2_GetString")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
if(!DOF2_GetString(PFile(playerid), "BankCode"))
pawn Код:
if(DOF2_GetString(PFile(playerid), "BankCode"))
Do not tell me I have to do DOF2_GetInt that I need String ..


Re: error 033: array must be indexed - benel1 - 24.11.2012

Help Please ..


Re: error 033: array must be indexed - iJumbo - 24.11.2012

show DOF2_GetString definition


Re: error 033: array must be indexed - benel1 - 24.11.2012

Quote:
Originally Posted by [ISS]jumbo
Посмотреть сообщение
show DOF2_GetString definition
What do you mean?


Respuesta: error 033: array must be indexed - Parka - 24.11.2012

PHP код:
new PFile[128];

if(!
DOF2_GetString(PFile"BankCode"))
pawn Cуdigo:
if(
DOF2_GetString(PFile"BankCode")) 



Re: error 033: array must be indexed - iJumbo - 24.11.2012

DOF2_GetString .. stock? define? function?


Re: error 033: array must be indexed - benel1 - 24.11.2012

Quote:
Originally Posted by cesar_******
Посмотреть сообщение
PHP код:
new PFile[128];
if(!
DOF2_GetString(PFile"BankCode"))
pawn Cуdigo:
if(
DOF2_GetString(PFile"BankCode")) 
i have a stock "PFile" ..
pawn Код:
stock PFile(playerid)
{
    new file[256];
    format(file,sizeof(file),"UsersRL/%s.ini",GetName(playerid));
    return file;
}
Quote:
Originally Posted by [ISS]jumbo
Посмотреть сообщение
DOF2_GetString .. stock? define? function?
include .. "Double-O-Files 2"


Re: error 033: array must be indexed - iJumbo - 24.11.2012

use strcmp


Respuesta: error 033: array must be indexed - Parka - 24.11.2012

PHP код:
    ///is the respective CallBack
    
new file[256];
    
format(file,sizeof(file),"UsersRL/%s.ini",GetName(playerid));
    
    if(!
DOF2_GetString(file"BankCode"))
    if(
DOF2_GetString(file"BankCode")) 
well test..


Re: error 033: array must be indexed - benel1 - 24.11.2012

Quote:
Originally Posted by [ISS]jumbo
Посмотреть сообщение
use strcmp
??
pawn Код:
if(strcmp(!DOF2_GetString(PFile(playerid), "BankCode"))) return ShowPlayerDialog(playerid, Bank, Input, "чег сегй", "фтн шащерд щмк лап\nара длрс чег сегй ащш йщощ аеък мфтойн дбаеъ", "дба", "бйием");
        if(strcmp(DOF2_GetString(PFile(playerid), "BankCode"))) return ShowPlayerDialog(playerid, Bank2, Input, "чег сегй", "длрс аъ дчег дсегй щмк", "дба", "бйием");
pawn Код:
C:\Users\аод\Desktop\Server\gamemodes\benel2.pwn(3847) : warning 202: number of arguments does not match definition
C:\Users\аод\Desktop\Server\gamemodes\benel2.pwn(3848) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.