18.06.2012, 08:56
Guys im sorry for such a nooby question but im REALLY new to scripting.
Here is my issue...
I get all the following errors:
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(611) : error 017: undefined symbol "vehicleid"
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(620) : error 017: undefined symbol "vehicleid"
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(644) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(644) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(649) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(649) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(654) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(654) : error 004: function "OnPlayerStateChange" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(659) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(659) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(659) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(664) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(664) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(669) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(669) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(669) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(674) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(674) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(679) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(679) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(679) : error 004: function "OnRconCommand" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(684) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(684) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(684) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(689) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(689) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(689) : error 004: function "OnObjectMoved" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(694) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(694) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(699) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(699) : error 004: function "OnPlayerPickUpPickup" is not implemented
and I think they all come from this part of the script:
public OnPlayerCommandText(playerid, cmdtext[]){
vehicleid = GetPlayerVehicleID(playerid);
if (strcmp("/nos", cmdtext, true, 10) == 0){
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000FF,"You must be in a vehicle.");
{
if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid,0xFF0000FF,"You need $5000 to buy nos.");
{
GivePlayerMoney(playerid, -5000); // -1000
AddVehicleComponent(vehicleid, 1010); // 10x Nitro
return 1;
}
if(strcmp(cmdtext,"/help", true, 10) == 0){
SendClientMessage(playerid, DarkRed, "This is a DeathMatch/Stunt/DM server, where you can roam around and kill people!");
SendClientMessage(playerid, DarkRed, "If killing is not your thing you can also Stunt and do a number of other stuff!");
return 1;
}
if(strcmp(cmdtext,"/health", true, 10) == 0){
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, DarkRed,"Your health has been restored for 1000$!");
GivePlayerMoney(playerid, -1000);
return 1;
}
if(strcmp(cmdtext,"/armor", true, 10) == 0){
SetPlayerArmour(playerid,100);
SendClientMessage(playerid, DarkRed,"Your armor has been restored for 2000$!");
GivePlayerMoney(playerid, -2000);
return 1;
}
return 0;
}
What is so wrong here...? Please all help is apprecciated!
Here is my issue...
I get all the following errors:
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(611) : error 017: undefined symbol "vehicleid"
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(620) : error 017: undefined symbol "vehicleid"
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(644) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(644) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(649) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(649) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(654) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(654) : error 004: function "OnPlayerStateChange" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(659) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(659) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(659) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(664) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(664) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(669) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(669) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(669) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(674) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(674) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(679) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(679) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(679) : error 004: function "OnRconCommand" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(684) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(684) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(684) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(689) : warning 225: unreachable code
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(689) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(689) : error 004: function "OnObjectMoved" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(694) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(694) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(699) : error 029: invalid expression, assumed zero
C:\Users\Joao Pedro\Desktop\Gta SA Server\gamemodes\mygamemode.pwn(699) : error 004: function "OnPlayerPickUpPickup" is not implemented
and I think they all come from this part of the script:
public OnPlayerCommandText(playerid, cmdtext[]){
vehicleid = GetPlayerVehicleID(playerid);
if (strcmp("/nos", cmdtext, true, 10) == 0){
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000FF,"You must be in a vehicle.");
{
if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid,0xFF0000FF,"You need $5000 to buy nos.");
{
GivePlayerMoney(playerid, -5000); // -1000
AddVehicleComponent(vehicleid, 1010); // 10x Nitro
return 1;
}
if(strcmp(cmdtext,"/help", true, 10) == 0){
SendClientMessage(playerid, DarkRed, "This is a DeathMatch/Stunt/DM server, where you can roam around and kill people!");
SendClientMessage(playerid, DarkRed, "If killing is not your thing you can also Stunt and do a number of other stuff!");
return 1;
}
if(strcmp(cmdtext,"/health", true, 10) == 0){
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, DarkRed,"Your health has been restored for 1000$!");
GivePlayerMoney(playerid, -1000);
return 1;
}
if(strcmp(cmdtext,"/armor", true, 10) == 0){
SetPlayerArmour(playerid,100);
SendClientMessage(playerid, DarkRed,"Your armor has been restored for 2000$!");
GivePlayerMoney(playerid, -2000);
return 1;
}
return 0;
}
What is so wrong here...? Please all help is apprecciated!