Da ich schon ein Bank-System habe, dachte ich mir, dass ich das doch mal eben zu einem ATM_system umschreiben könnte. Falsch gedacht ....
Hier mein momentaner Stand:
#define MAX_ATMS 7
Da habe diese Errors:
script.pwn(867) : error 001: expected token: ";", but found "{"
script.pwn(868) : error 010: invalid function or declaration
new atm[MAX_ATMS][3] =
{
{1185.1999512,-914.7999878,42.9000015},
{1504.9000244,-1710.6999512,13.6999998},
{1421.2171630,-980.4489140,1639.3854980},
{1424.6304930,-980.5266720,1639.3714600},
{1417.7136230,-980.4751590,1639.3635250},
{-1835.6014400,63.2456100,1054.8320300},
{1000.0999800,-917.0999800,42.0000000},
{1185.1999512,-914.7999878,42.9000015}
};
for(new i=0; i<MAX_ATMS; i++)
{
CreateDynamicObject(2942,1185.1999512,-914.7999878,42.9000015,0.0000000,0.0000000,282.0000000); //
CreateDynamicObject(2942,1000.0999756,-917.0999756,42.0000000,0.0000000,0.0000000,278.0000000); //
CreateDynamicObject(2942,493.0000000,-1503.0000000,20.2000008,0.0000000,0.0000000,266.0000000); //
CreateDynamicObject(2942,1504.9000244,-1710.6999512,13.6999998,0.0000000,0.0000000,90.0000000); //
CreateDynamicObject(2942,1421.2171630,-980.4489140,1639.3854980,0.0000000,0.0000000,0.0000000); //
CreateDynamicObject(2942,1424.6304930,-980.5266720,1639.3714600,0.0000000,0.0000000,0.0000000); //
CreateDynamicObject(2942,1417.7136230,-980.4751590,1639.3635250,0.0000000,0.0000000,0.0000000); //
CreateDynamicObject(2942,-1835.6014400,63.2456100,1054.8320300,0.0000000,0.0000000,270.0000000); //
}
stock PlayerbeimATM(playerid)
{
for(new i=0; i<MAX_ATMS; i++)
{
If(IsPlayerInRangeOfPoint(playerid, 2, atm[i][0], atm[i][1], atm[i][2])) return 1;
}
return 0;
}
Ich sitze da jetzt schon länger dran und verstehe nicht so ganz, wo das problem ist.
Könne mir jemand auf die Sprünge helfen?
LG Hammfaul