08.09.2010, 05:36
I have it now. The array GasInfo was on 14. But it has to be on 15!
(new GasInfo[14][GasData] --> new GasInfo[15][GasData])
thx for your help. But an other question
How can I do this better?
(new GasInfo[14][GasData] --> new GasInfo[15][GasData])
thx for your help. But an other question
How can I do this better?
Код:
stock SaveGasstation() { MySQLCheck(); new query[MAX_STRING];new idx; while(idx < 15) //15 = max data in gasstation { format(query, MAX_STRING, "UPDATE gasstation SET tGas=%d,tPosX=%f,tPosY=%f,tPosZ=%f WHERE ID=%d",GasInfo[idx][tBenzin],GasInfo[idx][tPosX],GasInfo[idx][tPosY],GasInfo[idx][tPosZ],idx+1); mysql_query(query); idx++; } return 1; }