forward OnGameMissionStart();
public OnGameMissionStart()
{ // Line 25 -> Then what to put in the include?
// my code is here
}
OnGameMissionStart()
{
// my code is here
}
C:\...mis01.pwn(25) : error 021: symbol already defined: "OnGameMissionStart"
OnGameMissionStart()
{
// my code is here
}
C:\...mis01.pwn(308) : warning 203: symbol is never used: "OnGameMissionStart"
forward OnGameMissionStart();
public OnGameMissionStart()
{
return 1;
}
C:\...testinc.inc(4) : error 017: undefined symbol "missionName"
C:\...testinc.inc(4) : warning 215: expression has no effect
C:\...testinc.inc(6) : error 017: undefined symbol "teamSkin"
C:\...testinc.inc(6) : warning 215: expression has no effect
C:\...testinc.inc(6) : error 001: expected token: ";", but found "]"
C:\...testinc.inc(6) : error 029: invalid expression, assumed zero
C:\...testinc.inc(6) : fatal error 107: too many error messages on one line
forward OnGameMissionStart();
public OnGameMissionStart()
{
missionName = "Lolz"; // line 4
teamSkin[0] = 29; // line 6
teamSkin[1] = 280;
teamSpawn[0][0] = 1361.3763;
teamSpawn[0][1] = -1651.0247;
teamSpawn[0][2] = 13.3828;
teamSpawn[0][3] = 276.9998;
teamSpawn[1][0] = 1580.1824;
teamSpawn[1][1] = -1635.0011;
teamSpawn[1][2] = 13.5612;
teamSpawn[1][3] = 96.8315;
teamWeapon[0][0] = 5;
teamWeapon[0][1] = 24;
teamWeapon[0][2] = 30;
teamWeapon[1][0] = 3;
teamWeapon[1][1] = 24;
teamWeapon[1][2] = 31;
teamWeaponAmmo[0][1] = 1;
teamWeaponAmmo[0][2] = 250;
teamWeaponAmmo[0][3] = 500;
teamWeaponAmmo[1][1] = 1;
teamWeaponAmmo[1][2] = 250;
teamWeaponAmmo[1][2] = 500;
return 1;
}
#include <testinc>
forward OnMissionInit();
public OnMissionInit()
{
new missionName[128];
SetGameModeText(missionName);
new teamSkin[2];
new Float:teamSpawn[2][4];
new teamWeapon[2][3];
new teamWeaponAmmo[2][3];
AddPlayerClass(teamSkin[0], teamSpawn[0][0], teamSpawn[0][1], teamSpawn[0][2], teamSpawn[0][3], teamWeapon[0][0], teamWeaponAmmo[0][0], teamWeapon[0][1], teamWeaponAmmo[0][1], teamWeapon[0][2], teamWeaponAmmo[0][2]);
AddPlayerClass(teamSkin[1], teamSpawn[1][0], teamSpawn[1][1], teamSpawn[1][2], teamSpawn[1][3], teamWeapon[1][0], teamWeaponAmmo[1][0], teamWeapon[1][1], teamWeaponAmmo[1][1], teamWeapon[1][2], teamWeaponAmmo[1][2]);
return 1;
}
The problem is, that it says you don't have variables with the following names: missionName, teamSkin. Anyway, will you please tell me what are you trying to do?
|
new
teamSkin[ 2 ],
Float:teamSpawn[ 2 ][ 4 ],
teamWeapon[ 2 ][ 3 ],
teamWeaponAmmo[ 2 ][ 3 ]
;
OnGameMissionStart()
{
SetGameModeText( "Lolz" );
teamSkin[ 0 ] = 29;
teamSkin[ 1 ] = 280;
teamSpawn[ 0 ][ 0 ] = 1361.3763;
teamSpawn[ 0 ][ 1 ] = -1651.0247;
teamSpawn[ 0 ][ 2 ] = 13.3828;
teamSpawn[ 0 ][ 3 ] = 276.9998;
teamSpawn[ 1 ][ 0 ] = 1580.1824;
teamSpawn[ 1 ][ 1 ] = -1635.0011;
teamSpawn[ 1 ][ 2 ] = 13.5612;
teamSpawn[ 1 ][ 3 ] = 96.8315;
teamWeapon[ 0 ][ 0 ] = 5;
teamWeapon[ 0 ][ 1 ] = 24;
teamWeapon[ 0 ][ 2 ] = 30;
teamWeapon[ 1 ][ 0 ] = 3;
teamWeapon[ 1 ][ 1 ] = 24;
teamWeapon[ 1 ][ 2 ] = 31;
teamWeaponAmmo[ 0 ][ 0 ] = 1;
teamWeaponAmmo[ 0 ][ 1 ] = 250;
teamWeaponAmmo[ 0 ][ 2 ] = 500;
teamWeaponAmmo[ 1 ][ 0 ] = 1;
teamWeaponAmmo[ 1 ][ 1 ] = 250;
teamWeaponAmmo[ 1 ][ 2 ] = 500;
return 1;
}
public OnGameModeInit()
{
OnGameMissionStart();
AddPlayerClass( teamSkin[ 0 ], teamSpawn[ 0 ][ 0 ], teamSpawn[ 0 ][ 1 ], teamSpawn[ 0 ][ 2 ], teamSpawn[ 0 ][ 3 ], teamWeapon[ 0 ][ 0 ], teamWeaponAmmo[ 0 ][ 0 ], teamWeapon[ 0 ][ 1 ], teamWeaponAmmo[ 0 ][ 1 ], teamWeapon[ 0 ][ 2 ], teamWeaponAmmo[ 0 ][ 2 ] );
AddPlayerClass( teamSkin[ 1 ], teamSpawn[ 1 ][ 0 ], teamSpawn[ 1 ][ 1 ], teamSpawn[ 1 ][ 2 ], teamSpawn[ 1 ][ 3 ], teamWeapon[ 1 ][ 0 ], teamWeaponAmmo[ 1 ][ 0 ], teamWeapon[ 1 ][ 1 ], teamWeaponAmmo[ 1 ][ 1 ], teamWeapon[ 1 ][ 2 ], teamWeaponAmmo[ 1 ][ 2 ] );
return 1;
}