04.11.2013, 03:57
Ok. So from this tutorial, people will get 15 errors. Here they are:
What is this? You've not explained it what so ever. This is what should be done.
First of all, you will need to include the following:
The reason for including these, is first of all: a_samp - This gives all of the functions needed to even compile the script to make it work, then along with the majority of all SA-MP functions.
zcmd - This is a command processor. This will be used to create the command and let it run smoothly without error.
After you have done that, you are going to need to create the command. This is how it is done:
It's as simple as that. To see all comments, on the box above; scroll to the right hand side.
What is so hard about that? 5 minutes of work. (I know it's not explained all the best, but it still makes more sense to all others IMO.)
Код:
C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(62) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit") C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(64) : error 017: undefined symbol "funcidx" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(65) : error 017: undefined symbol "funcidx" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(66) : error 017: undefined symbol "funcidx" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(68) : error 017: undefined symbol "CallLocalFunction" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(83) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText") C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(85) : error 017: undefined symbol "CallLocalFunction" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(94) : error 017: undefined symbol "tolower" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(96) : warning 217: loose indentation C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(96) : error 017: undefined symbol "format" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(96) : warning 202: number of arguments does not match definition C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(96) : warning 202: number of arguments does not match definition C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(96) : warning 202: number of arguments does not match definition C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(97) : warning 217: loose indentation C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(98) : warning 217: loose indentation C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(102) : error 017: undefined symbol "CallLocalFunction" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(104) : error 017: undefined symbol "CallLocalFunction" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(108) : error 017: undefined symbol "CallLocalFunction" C:\Users\cex\Desktop\Game Files\Grand County Roleplay\pawno\include\zcmd.inc(110) : error 017: undefined symbol "CallLocalFunction" C:\Users\cex\Desktop\burn.pwn(6) : error 017: undefined symbol "PlayerInfo" C:\Users\cex\Desktop\burn.pwn(6) : warning 215: expression has no effect C:\Users\cex\Desktop\burn.pwn(6) : error 001: expected token: ";", but found "]" C:\Users\cex\Desktop\burn.pwn(6) : error 029: invalid expression, assumed zero C:\Users\cex\Desktop\burn.pwn(6) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
First of all, you will need to include the following:
pawn Код:
#include <a_samp>
#include <zcmd>
zcmd - This is a command processor. This will be used to create the command and let it run smoothly without error.
After you have done that, you are going to need to create the command. This is how it is done:
pawn Код:
command(burn, playerid, params[]) //This is how the ZCMD processor is used, this is creating the command so it can be used and perform the required code.
{
for(new i=0; i<MAX_PLAYERS; i++) //This will create a loop to see who is connected to the server.
{
if(IsPlayerConnected(i)) //This will check the loop to see if the player(s) are connected, and if so they will be selected and the music file will be played out to them.
{
PlayAudioStreamForPlayer(i,"http://dl.farskids405.com/Aria/92/4/15/Ellie%20Goulding%20-%20Burn%20[128].mp3"); //This function will grab the mp3 file from the URL, then play it back to the connected players.
SendClientMessageToAll(-1, "Track playing-Ellie Goulding - Burn"); //This will send a message to all connected players, notifying them that "Ellie Goulding - Burn" is playing.
}
}
return 1;
}
What is so hard about that? 5 minutes of work. (I know it's not explained all the best, but it still makes more sense to all others IMO.)