new randphonec = 1000000 + random(8999999)
new numberro[11]; format(numberro, sizeof(numberro), "074%s", randphonec); PlayerInfo[playerid][pPnumber] = numberro[11];
error 032: array index out of bounds (variable "numberro")
PlayerInfo[playerid][pPnumber] = numberro[11];
randphonec:
Код:
new randphonec = 1000000 + random(8999999) Код:
new numberro[11]; format(numberro, sizeof(numberro), "074%s", randphonec); PlayerInfo[playerid][pPnumber] = numberro[11]; Error: Код:
error 032: array index out of bounds (variable "numberro") Код:
PlayerInfo[playerid][pPnumber] = numberro[11]; |
if(listitem == 0) { if(GetPlayerCash(playerid) <= 319) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money."); if(PlayerInfo[playerid][pPhone] == 1) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "Ai deja un iPhone."); new str[184]; GivePlayerCash(playerid,-320); BizzInfo[bid][bTill] += 320; mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[bid][bTill],bid); mysql_tquery(SQL,str,"",""); GameTextForPlayer(playerid, "~r~-320 de lei", 3000, 1); do { new numberro[11], randphonec = 1000000 + random(8999999); format(numberro, sizeof(numberro), "074%s", randphonec); PlayerInfo[playerid][pPnumber] = numberro[11]; } while(NumberUsed(playerid)); format(string, sizeof(string), "Ai cumparat un telefon,numarul tau este: %d.", numberro); SendClientMessage(playerid, COLOR_WHITE, string); mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Money`='%d',`PhoneNr`='%d' WHERE `name`='%s'",GetPlayerCash(playerid),PlayerInfo[playerid][pPnumber],PlayerInfo[playerid][pNormalName]); mysql_tquery(SQL,str,"",""); return 1; }
C:\Program Files (x86)\Server_Samp\Gamemode-uri\Pear dupa un update\gamemodes\pear.pwn(53209) : error 032: array index out of bounds (variable "numberro") C:\Program Files (x86)\Server_Samp\Gamemode-uri\Pear dupa un update\gamemodes\pear.pwn(53212) : error 017: undefined symbol "numberro"
PlayerInfo[playerid][pPnumber] = numberro[11];
format(string, sizeof(string), "Ai cumparat un telefon,numarul tau este: %d.", numberro);
if(listitem == 0) { if(GetPlayerCash(playerid) <= 319) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money."); if(PlayerInfo[playerid][pPhone] == 1) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "Ai deja un iPhone."); new str[184]; GivePlayerCash(playerid,-320); BizzInfo[bid][bTill] += 320; mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[bid][bTill],bid); mysql_tquery(SQL,str,"",""); GameTextForPlayer(playerid, "~r~-320 de lei", 3000, 1); do { new randphonec = 1000000 + random(8999999); format(PlayerInfo[playerid][pPnumber], 11, "074%d", randphonec); } while(NumberUsed(playerid)); format(string, sizeof(string), "Ai cumparat un telefon,numarul tau este: %d.", PlayerInfo[playerid][pPnumber]); SendClientMessage(playerid, COLOR_WHITE, string); mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Money`='%d',`PhoneNr`='%d' WHERE `name`='%s'",GetPlayerCash(playerid),PlayerInfo[playerid][pPnumber],PlayerInfo[playerid][pNormalName]); mysql_tquery(SQL,str,"",""); return 1; }