28.03.2010, 13:57
Код:
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(); }
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]);