Error that cant be fixed
#1

PHP код:
CMD:fixmyvw(playeridparams[])
{
{
    new 
rand random(sizeof(RandomSpawn));
    if(
IsPlayerInRangeOfPoint(playerid10, -99.83441106.824119.2258))
    
GameTextForPlayer(playerid"/fixmyvw to repair your car"40005);
    
SetPlayerPos(playeridRandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    
SetPlayerFacingAngle(playeridRandomSpawn[rand][3]);
    if(
IsPlayerInAnyVehicle(playerid) == 1)
{
    new 
car GetPlayerVehicleID(playerid);
    
SetVehiclePos(carRandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    
PutPlayerInVehicle(playeridcar);
}
}
    return 
1;
}
new 
Float:RandomSpawn[][4] =
{
    
    {-
96.92101118.136519.22580.0000},
    { -
102.92091118.143219.22580.0000},
    { -
99.94091118.134419.22580.0000}
}; 
I got
Код:
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(15565) : warning 202: number of arguments does not match definition
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(15807) : warning 202: number of arguments does not match definition
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(19292) : error 017: undefined symbol "RandomSpawn"
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(19292) : error 029: invalid expression, assumed zero
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(19292) : warning 215: expression has no effect
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(19295) : error 017: undefined symbol "RandomSpawn"
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(19296) : error 017: undefined symbol "RandomSpawn"
C:\Users\Andrew\Desktop\samp server\gamemodes\RP.pwn(19300) : error 017: undefined symbol "RandomSpawn"
Reply
#2

Add RandomSpawn BEFORE the part you're using it inside (/fixmyvw in your case).

Replace SetVehicleFacingAngle with SetVehicleZAngle.

And this line:
pawn Код:
PutPlayerInVehicle(playerid, car);
to:
pawn Код:
PutPlayerInVehicle(playerid, car, 0);
You forgot the seat as parameter.
Reply
#3

when i try to compile, pawno crashes
Reply
#4

It's because you've too many errors. Check the brackets, maybe you have missed one.
Reply
#5

the brackets are fine....

When i put
new rand = random(sizeof(RandomSpawn));
to another place pawno crashes :@
Reply
#6

bump
Reply
#7

Show us the RandomSpawn array.
Reply
#8

new Float:RandomSpawn[][4] =
{

{-96.9210, 1118.1365, 19.2258, 0.0000},
{ -102.9209, 1118.1432, 19.2258, 0.0000},
{ -99.9409, 1118.1344, 19.2258, 0.0000}
};
new rand = random(sizeof(RandomSpawn));
Reply
#9

Try to remove new rand = ... and compile.

Let me know if the crashing is away.
Reply
#10

crash again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)