[ YSI Error ? ]
#1

I get error, I mean nothing should be out of bonds, I typed LSPD and got this error...

PHP код:
[debugRun time error 4"Array index out of bounds"
[debugAMX backtrace:
[
debug#0 000ce928 in ?? (playerid=0, dialogid=60, response=1, listitem=-1, inputtext[]=@026e7c90 "LSPD", ... <1073741818 arguments>) at modules/factions/Functions.pwn:43
[debug#1 0001c1e4 in public OnDialogResponse (... <5 arguments>) at D:\foldername\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:114 
Dialogid [ 60 ]

// https://pastebin.com/JM4LiCEQ
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
That's not a YSI error. The problem is here:

modules/factions/Functions.pwn:43

If the error is in that code (which I can't tell because I don't know which is line 43) I'd guess it has something to do with "id" being invalid.
Thanks btw
PHP код:
strmid(OI[id][oPreFix], prefix0strlen(prefix), 10); 
EDIT: Ill do a debug now

Yep that's the bug

PHP код:
new orgid Iter_Free(CountOrg); 
Iter_Free = 0, I think it should be 1 How to fix this
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
Are you sure?
PHP код:
[20:09:53Faction ID
// Code: https://pastebin.com/0rSdVuNm

All tho "ID" = to this

PHP код:
new id GetNearestOrganization(playerid);
//
GetNearestOrganization(playerid)
{
    for(new 
1MAX_FACTb++)
    {
        if(
IsPlayerInRangeOfPoint(playerid2.0OI[b][oPozExtX], OI[b][oPozExtY], OI[b][oPozExtZ])) return b;
    }
    return -
1;

And i create This dialog before this
PHP код:
OI[orgid][oPozExtX] = X_COI[orgid][oPozExtY] = Y_COI[orgid][oPozExtZ] = Z_C
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
I mean are you sure that `Iter_Free` should return 1? 0 is always the first value.
Hmm, eariler it all worked good I don't know whats the problem... if it's 0 then it worked eariler too...

EDIT:

I get the error for this?

PHP код:
strmid(OI[id][oPreFix], prefix0strlen(prefix), 5); // line 45
// Enum for Factions
oPreFix[5
Reply
#5

Yeah I get the error for strmid, any help?

PHP код:
strmid(OI[id][oPreFix], prefix0strlen(prefix), 5); 
EDIT: FIXED !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)