PDA

View Full Version : Error 029


DATBasar
23/01/2014, 11:54 AM
if( new !strcmp("/racetrack", cmdtext, true))

Error 029:
C:\Users\DTBS\Desktop\Games\gm\GTA SA\filterscripts\nope.pwn(7) : error 029: invalid expression, assumed zero
C:\Users\DTBS\Desktop\Games\gm\GTA SA\filterscripts\nope.pwn(7) : error 029: invalid expression, assumed zero
C:\Users\DTBS\Desktop\Games\gm\GTA SA\filterscripts\nope.pwn(7) : error 029: invalid expression, assumed zero

I need help i don't know what is the problem.

Nourdin
23/01/2014, 12:09 PM
if(strcmp(cmd, "/racetrack",true) == 0)


I guess you would need that instead of what you have.

DATBasar
23/01/2014, 12:36 PM
It won't work. Please help!

Error:

C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : error 029: invalid expression, assumed zero
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : warning 215: expression has no effect
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : warning 215: expression has no effect
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : error 001: expected token: ";", but found ")"
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : error 029: invalid expression, assumed zero
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : fatal error 107: too many error messages on one line

Code:

#include <a_samp>

#define playerid

#define cmd

#define cmdtext

public OnGameModeInit()
{
if(strcmp(cmd, "/racetrack",true) == 0)
{
SetPlayerInterior(playerid,0);
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid) ,0);
SetVehiclePos(GetPlayerVehicleID(playerid),-521.0,-3643.0,7.0);
SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0) ;
}
else
{
SetPlayerPos(playerid,-521.0,-3643.0,7.0);
SetPlayerFacingAngle(playerid,0.0);
}
return 1;
}

UnknownOwner
23/01/2014, 12:38 PM
It won't work. Please help!

Error:

C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(7) : error 017: undefined symbol "cmdtext"
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(9) : error 029: invalid expression, assumed zero
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(9) : warning 215: expression has no effect
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(9) : error 001: expected token: ";", but found ")"
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(9) : error 029: invalid expression, assumed zero
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(9) : fatal error 107: too many error messages on one line

Code:

#include <a_samp>

#define playerid

public OnGameModeInit()
{
if (!strcmp("/racetrack",cmdtext,true))
{
SetPlayerInterior(playerid,0);
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid) ,0);
SetVehiclePos(GetPlayerVehicleID(playerid),-521.0,-3643.0,7.0);
SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0) ;
}
else
{
SetPlayerPos(playerid,-521.0,-3643.0,7.0);
SetPlayerFacingAngle(playerid,0.0);
}
return 1;
}
You can't place commands on OnGameModeInit. GameModeInit is used to load various files etc.
Try putting this command under OnPlayerCommandText

DATBasar
23/01/2014, 12:42 PM
Error:

C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : error 029: invalid expression, assumed zero
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : warning 215: expression has no effect
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : warning 215: expression has no effect
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : error 001: expected token: ";", but found ")"
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : error 029: invalid expression, assumed zero
C:\Users\ErenBaşar\Desktop\Oyunlar\Minecraft Series\GTA SA\filterscripts\nope.pwn(11) : fatal error 107: too many error messages on one line

Code:

#include <a_samp>

#define playerid

#define cmd

#define cmdtext

public OnPlayerCommandText()
{
if(strcmp(cmd, "/racetrack",true) == 0)
{
SetPlayerInterior(playerid,0);
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid) ,0);
SetVehiclePos(GetPlayerVehicleID(playerid),-521.0,-3643.0,7.0);
SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0) ;
}
else
{
SetPlayerPos(playerid,-521.0,-3643.0,7.0);
SetPlayerFacingAngle(playerid,0.0);
}
return 1;
}



(11): if(strcmp(cmd, "/racetrack",true) == 0)