• Welcome to Vice City Multiplayer.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - bilakispa

#1
mIRC/pawn Scripting / [pawn] Dcmd command errors
March 03, 2010, 10:32:37 PM
Aww, damn it! I can't find what's wrong with this. (Note: I have defined dcmd.)

public OnPlayerCommandText(playerid, cmdtext[])
{
     dcmd(fix,3,cmdtext); //<--------- LINE 67
     ...other commands..
     return 0;
}

dcmd_fix(playerid, params[])
{
#pragma unused params
if (!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle");
else
{
if (GetPlayerState(playerid) == 2)
{
int vehicleid=GetPlayerVehicleID(playerid); float x,y,z;
RemovePlayerFromVehicle(playerid);
GetVehiclePos(vehicleid, x, y, z);
SetVehicleToRespawn(vehicleid);
SetVehiclePos(vehicleid, x, y, z, 0);
PutPlayerInVehicle(playerid, vehicleid);
}
else SendClientMessage(playerid, COLOR_RED, "You can't fix the vehicle as a passenger");
}
return 1;
}


Compiler Output:
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : error 001: expected token: ";", but found ")"
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : fatal error 107: too many error messages on one line



Also, shouldn't be a GetVehicleRot Function for the vehicle rotation?