SA-MP Forums Archive
Car Shop [Need Some Help] - 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)
+--- Thread: Car Shop [Need Some Help] (/showthread.php?tid=325266)



Car Shop [Need Some Help] - Serifukas - 12.03.2012

Hi.

I want put car buying system to my server but now i get the problem.

Errors:

Код:
error 017: undefined symbol "ShopVehicles"
error 036: empty statement
error 017: undefined symbol "i"
fatal error 107: too many error messages on one line
Code :

Код:
public OnGameModeInit()
{

	for(new i = 0; i < sizeof(ShopVehicles); i ++)
	{
	    ShopVehicles[i][VehicleID] = CreateVehicle(ShopVehicles[i][VehicleModel], ShopVehicles[i][Pos_X], ShopVehicles[i][Pos_Y], ShopVehicles[i][Pos_Z], ShopVehicles[i][Pos_A], -1, -1, -1);
        vehicleDB[ShopVehicles[i][VehicleID]][parduodama] = true;
        new String[128];
        format(String, sizeof(String), "{99ff00}Vehicle :{FFFFFF} %s\n{99ff00}Price :{FFFFFF} %i$\n{99ff00}Sell price:{FFFFFF} %i$", aVehicleNames[GetVehicleModel(ShopVehicles[i][VehicleID]) - 400], ShopVehicles[i][Price], ShopVehicles[i][Price]/2);
        Attach3DTextLabelToVehicle(Create3DTextLabel(String, -1, 0.0, 0.0, 0.0, 10.0, 0), ShopVehicles[i][VehicleID], 0.0, 0.0, 1.0);
	}

	return 1;
}
What can be wrong with this code? help if someone can help.