29.07.2012, 02:57
Quote:
Then how come mine worked for me on my test server... and yours isnt working for either me nor you?
|
Code:
C:\Users\Milan\Documents\GTA San Andreas Scripts + Server\Reality Roleplay Gamemode Script\RealityRPrr.pwn(36094) : error 067: variable cannot be both a reference and an array (variable "name") C:\Users\Milan\Documents\GTA San Andreas Scripts + Server\Reality Roleplay Gamemode Script\RealityRPrr.pwn(36095) : error 067: variable cannot be both a reference and an array (variable "name") C:\Users\Milan\Documents\GTA San Andreas Scripts + Server\Reality Roleplay Gamemode Script\RealityRPrr.pwn(36110) : error 090: public functions may not return arrays (symbol "GetNearestBus")
pawn Code:
forward GetNearestBus(playerid, &name[], len);
public GetNearestBus(playerid, &name[], len)
{
new Float:d = 9999.000;
new Float:dis = 0.0000;
new number = -1;
for(new i = 0; i <= sizeof(BusStops); i++)
{
dis = GetPlayerDistanceFromPoint(playerid, BusStops[i][BusCords][0], BusStops[i][BusCords][1], BusStops[i][BusCords][2]);
if(dis < d)
{
d = dis;
number = i;
}
}
format(name, len, BusStops[number][BusName], 0);
return name;
}
EDIT: Ill check this thread tomorrow if needed, sorry if I was wrong but I can't think atm.
I'll review it again tomorrow when I can actually think

G-Night