Help Me Please
#1

i have this problem in my server how i can fix it pls and thanks

Код:
[debug] Run time error 4: "Array index out of bounds"
[debug]  Attempted to read/write array element at negative index -1
[debug] AMX backtrace:
[debug] #0 0007b800 in ?? (15) in wordwar.amx
[debug] #1 000c0b3c in public OnQueryFinished (14, 0) in wordwar.amx
any one if u know how to fix please tell me my brother
Reply
#2

Can you show us the code in the public "OnQueryFinished"?
Reply
#3

where i can get it to show u please tell me bro
Reply
#4

Код:
}


forward OnQueryFinished(threadid, extraid);
public OnQueryFinished(threadid, extraid)
{
	new rows = cache_get_row_count(connectionID);

	switch(threadid)
	{
Reply
#5

Yes, right dat code, but please the full code, not just 3 lines
Reply
#6

Код:
}


forward OnQueryFinished(threadid, extraid);
public OnQueryFinished(threadid, extraid)
{
	new rows = cache_get_row_count(connectionID);

	switch(threadid)
	{
	    case THREAD_LOOKUP_BANS:
	    {
	        if(rows)
        	{
	            new bannedby[24], date[24], reason[128];

	            cache_get_field_content(0, "bannedby", bannedby);
	            cache_get_field_content(0, "date", date);
	            cache_get_field_content(0, "reason", reason);

	            GameTextForPlayer(extraid, "~r~You are banned!", 999999, 3);
				TextDrawHideForPlayer(extraid, welcomenew);
				if(cache_get_field_content_int(0, "permanent"))
				    SendClientMessageEx(extraid, COLOR_YELLOW, "You are permanently banned from this server.");
				else
					SendClientMessageEx(extraid, COLOR_YELLOW, "You are banned from this server. You can appeal your ban at Deviation.cf.");

				SendClientMessageEx(extraid, COLOR_LIGHTRED, "Admin: %s", bannedby);
	            SendClientMessageEx(extraid, COLOR_LIGHTRED, "Date: %s", date);
	            SendClientMessageEx(extraid, COLOR_LIGHTRED, "Reason: %s", reason);

				KickPlayer(extraid);
	        }
	        else
	        {
	            mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%s'", GetPlayerNameEx(extraid));
				mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_ACCOUNT, extraid);
	        }
		}
	    case THREAD_LOOKUP_ACCOUNT:
	    {
	        if(rows)
	        {
Reply
#7

Код:
}
ReloadBusiness(businessid)
{
	if(BusinessInfo[businessid][bExists])
	{
	    new
	        string[128], color;

		DestroyDynamic3DTextLabel(BusinessInfo[businessid][bText]);
		DestroyDynamicPickup(BusinessInfo[businessid][bPickup]);
        DestroyDynamicMapIcon(BusinessInfo[businessid][bMapIcon]);
		if(BusinessInfo[businessid][bColor] == -1 || BusinessInfo[businessid][bColor] == -256)
		{
			color = 0xC8C8C8FF;
		}
		else
		{
		    color = BusinessInfo[businessid][bColor];
		}
        if(BusinessInfo[businessid][bOwnerID] == 0)
        {
	        format(string, sizeof(string), "[Business]\nPrice: %s\nType: %s\nEntry Fee: $%i\nStatus: %s", FormatNumber(BusinessInfo[businessid][bPrice]), bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bEntryFee], (BusinessInfo[businessid][bLocked]) ? ("{ffff00}Closed") : ("{00AA00}Opened"));
		}
		else
		{
		    format(string, sizeof(string), "[{ffff00}{%06x}%s{FFFF00}]{E6E6E6}\nOwner: %s\nType: %s\nEntry Fee: $%i\nStatus: %s", color >>> 8, BusinessInfo[businessid][bDescription], BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bEntryFee], (BusinessInfo[businessid][bLocked]) ? ("{FFFF00}Closed") : ("{00AA00}Open"));
		}

		BusinessInfo[businessid][bText] = CreateDynamic3DTextLabel(string, COLOR_GREY1, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ] + 0.1, 10.0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]);
        BusinessInfo[businessid][bPickup] = CreateDynamicPickup(GetBusinessDefaultPickup(businessid), 1, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]);

		switch(BusinessInfo[businessid][bType])
		{
		    case BUSINESS_STORE: 		BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 17, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		    case BUSINESS_GUNSHOP: 		BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 6, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		    case BUSINESS_CLOTHES: 		BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 45, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		    case BUSINESS_RESTAURANT: 	BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 10, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		    case BUSINESS_GYM: 			BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 54, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		    case BUSINESS_AGENCY: 		BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 58, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		    case BUSINESS_BARCLUB: 		BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 49, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		    case BUSINESS_TOOLSHOP:     BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 11, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
		}
	}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)