SA-MP Forums Archive
Array dimensions do not match - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Array dimensions do not match (/showthread.php?tid=137299)



Array dimensions do not match - ^Woozie^ - 28.03.2010

Код:
ReturnHouseInfo(playerid,houseid)
{
new string[256],into[2][2],hstr[2][128];
new current_zarea = PlayerWant[playerid][player_zarea];
new current_zone = PlayerWant[playerid][player_zone];
if(gs_IsHouseExist(houseid))
{
PlayerWant[playerid][PickedUpHousePickup] = 1;
PlayerWant[playerid][PlayerPickedUpHouseID] = houseid;
gs_GetHouseInfo(houseid,into[1],hstr[1]);
if(strcmp("No",hstr[1],true))
{
format(string,256,"~b~%s~n~~p~Location: ~y~%s, %s~n~~y~Owner:%s~n~~g~Interior: %d~n~~r~Cost:%d$~n~~p~You can't buy this house.",hstr[0],zones[current_zone][zone_name],zarea[current_zarea][zarea_name],RusToGame(hstr[1]),into[1],into[0]);
UpdatePlayerHouseText(playerid,string);
}else{
format(string,256,"~b~%s~n~~p~Location: ~y~%s, %s~n~~y~Owner:%s~n~~g~Interior: %d~n~~r~Cost:%d$~n~~p~Write /buy to buy this house.",hstr[0],zones[current_zone][zone_name],zarea[current_zarea][zarea_name],RusToGame(hstr[1]),into[1],into[0]);
UpdatePlayerHouseText(playerid,string);
}
}else{
format(string,256,"Error: ReturnHouseInfo(%d,%d);",playerid,houseid);
print(string);
}
return 1;
}

Код:
stock gs_GetHouseInfo(hid,inti[2][2],hstr[2][128])
{
new query[SQL_CHECKER_SIZE],fetchy[2][2],ferra[2][128];
format(query,sizeof(query),"SELECT Cost, Interior, Owner, Name FROM `"HouseTableName"` WHERE `ID` = '%s'",hid);
mysql_query(query);
mysql_store_result();
mysql_fetch_field("Cost",fetchy[0]);
mysql_fetch_field("Interior",fetchy[1]);
mysql_fetch_field("Owner",ferra[0]);
mysql_fetch_field("Name",ferra[1]);
inti[0] = fetchy[0];
inti[1] = fetchy[1];
hstr[0] = ferra[0];
hstr[1] = ferra[1];
mysql_free_result();
}
Error

C:\Users\Psycho\Desktop\Èãðû\SA-MP Server\gamemodes\baredm.pwn(6265) : error 048: array dimensions do not match
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Код:
gs_GetHouseInfo(houseid,into[1],hstr[1]);
how fix it?


Re: Array dimensions do not match - [LSR]State_Trooper - 28.03.2010

this MAY help ( not sure ) Wortha try:

error 084: state conflict: one of the states is already assigned to another implementation (symbol "% s") -;


Re: Array dimensions do not match - [LSR]State_Trooper - 28.03.2010

Sorry for double post,

try:

gs_GetHouseInfo(houseid,into[1],hstr[1]));

may work may not. Just a guess.


Re: Array dimensions do not match - ^Woozie^ - 28.03.2010




Re: Array dimensions do not match - [LSR]State_Trooper - 28.03.2010

............?


Re: Array dimensions do not match - ^Woozie^ - 28.03.2010

Don't work.


Re: Array dimensions do not match - [LSR]State_Trooper - 28.03.2010

which one?? both of themm...

Look at this list: http://forum.sa-mp.com/index.php?topic=162589.0




Re: Array dimensions do not match - ^Woozie^ - 28.03.2010

LOL! I founded error

this true:
Код:
gs_GetHouseInfo(houseid,into,hstr);



Re: Array dimensions do not match - [LSR]State_Trooper - 28.03.2010

have u tryed with out the ; ?? Just a suggestion.