29.03.2010, 21:54
Can some one please help me , when i convert this cool FS with my GM i get this :
Here the script if someone can please help
PS. i have translated some part of the FS and GM , i hope that is not a problem
Quote:
../include/gl_common.inc(75) : error 021: symbol already defined: "strtok" ../include/gl_common.inc(90) : error 047: array sizes do not match, or destination array is too small ../include/gl_common.inc(134) : error 021: symbol already defined: "isNumeric" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 29) : error 017: undefined symbol "PlayerName" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 87) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 92) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 107) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 110) : error 017: undefined symbol "dcmd_login" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 110) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 111) : error 017: undefined symbol "dcmd_register" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 111) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 112) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 115) : warning 225: unreachable code C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 115) : warning 217: loose indentation C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 115) : error 029: invalid expression, assumed zero C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 115) : error 004: function "SystemMsg" is not implemented C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 116) : error 017: undefined symbol "msg" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 117) : error 017: undefined symbol "msg" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 119) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 122) : warning 225: unreachable code C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 122) : error 029: invalid expression, assumed zero C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 122) : error 017: undefined symbol "PlayerName" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 125) : error 090: public functions may not return arrays (symbol "OnPlayerCommandText") C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 12 : warning 225: unreachable code C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 12 : warning 217: loose indentation C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 12 : error 017: undefined symbol "dcmd_register" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 130) : error 004: function "SystemMsg" is not implemented C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 130) : error 079: inconsistent return types (array & non-array) C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 131) : error 017: undefined symbol "PlayerName" C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 131) : error 004: function "SystemMsg" is not implemented C:\DOCUME~1\Ivan\Desktop\BALKAN~1\GAMEMO~1\BL.pwn( 131) : error 079: inconsistent return types (array & non-array) Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors. |
PS. i have translated some part of the FS and GM , i hope that is not a problem
Quote:
#include <a_samp> #include <core> #include <float> #include <dudb> #include <dutils> #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #include "../include/gl_common.inc" #define COLOR_SYSTEM 0xEFEFF7AA #define green 0x33FF33AA #define blue 0x00FFFFAA forward OneSecTimer(); new PLAYERLIST_authed[MAX_PLAYERS]; main() { print("\n----------------------------------"); print(" Balkan Life script by ivan"); print("----------------------------------\n"); } public OnPlayerRequestSpawn(playerid) { if (udb_Exists(PlayerName(playerid))){ if (!PLAYERLIST_authed[playerid]){ SendClientMessage(playerid,green,"Vi ste vec registrovani , upisite /login da se ulogujete !"); return 0; } } return 1; } public OnGameModeInit() { // Lista skinova (skinID, pozicija1, pozicija2, pozicija3 , oruzije1, oruzije2, oruzije3, oruzije4, oruzije5, ); SetGameModeText("Balkan Life RP server"); AddPlayerClass(192, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(195, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(12, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(13, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(216, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(19, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(20, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(188, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(186, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(226, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(24, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(250, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(28, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(262, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(47, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(48, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(7, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(55, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 2498.9995,1149.3556,22.0232); SetPlayerCameraPos(playerid, 2499.2422,1145.4624,22.0232); SetPlayerCameraLookAt(playerid, 2498.9995,1149.3556,22.0232); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new idx; cmd = strtok(cmdtext, idx); if (strcmp("/skripteri", cmdtext, true, 10) == 0) { SendClientMessage(playerid, 0xFFFFFFFF, "____________Balkan Life Skripteri____________"); SendClientMessage(playerid, 0xFFFFFFFF, "Ivan_Pantovic"); SendClientMessage(playerid, 0xFFFFFFFF, "____________Balkan Life Skripteri____________"); return 1; } if(strcmp( cmd, "/vehicle", true ) == 0 ) { if(!IsPlayerAdmin(playerid)) return 0; { new Float:X, Float:Y, Float:Z; new tmp[256]; new created_vehicle_id; tmp = strtok( cmdtext, idx ); GetPlayerPos( playerid, X, Y, Z ); created_vehicle_id = CreateVehicle( strval(tmp), X+2, Y+2, Z, 0, 0, 0, -1 ); new msg[256]; format(msg,256,"Created vehicle: %d",created_vehicle_id); SendClientMessage(playerid,0xAAAAAAAA,msg); return 1; } { dcmd(login,5,cmdtext); dcmd(register,8,cmdtext); return 0; } stock SystemMsg(playerid,msg[]) { if ((IsPlayerConnected(playerid))&&(strlen(msg)>0)) { SendClientMessage(playerid,COLOR_SYSTEM,msg); } return 1; } stock PlayerName(playerid) { new name[255]; GetPlayerName(playerid, name, 255); return name; } dcmd_register(playerid,params[]) { if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"You have already had an account."); if (udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"You have already created an account, /login [password] to login."); if (strlen(params)==0) return SystemMsg(playerid,"USAGE: /register [password]"); if (udb_Create(PlayerName(playerid),params)) return SystemMsg(playerid,"You have successfully created your account, now use /login [password] to login."); return true; } dcmd_login(playerid,params[]) { if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"You have already logined."); if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"You do not have an account, please /register [password]"); if (strlen(params)==0) return SystemMsg(playerid,"USAGE: /login [password]"); if (udb_CheckLogin(PlayerName(playerid),params)) { SetPlayerScore(playerid,dUserINT(PlayerName(player id)).("score")); SetPlayerMoney(playerid,dUserINT(PlayerName(player id)).("money")); PLAYERLIST_authed[playerid]=true; return SystemMsg(playerid,"You have successfully logined."); } return SystemMsg(playerid,"Wrong password or nickname!"); } } return 0; } public OnPlayerConnect(playerid) { new pName[MAX_PLAYER_NAME]; new string[48]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "%s se prikacio na server.", pName); SendClientMessageToAll(0xAAAAAAAA, string); return 1; } { if (PLAYERLIST_authed[playerid]==0){ if (udb_Exists(PlayerName(playerid))){ SystemMsg(playerid,"Vec ste registrovani, upisite /login [sifra] da se ulogujete."); } else{ SystemMsg(playerid,"Vi niste registrovani, upisite /register [sifra] da se registrujete, a zatim /login [sifra] da se ulogujete!"); } return 0; } return 1; } public OnPlayerDisconnect(playerid) { if (PLAYERLIST_authed[playerid]) { dUserSetINT(PlayerName(playerid)).("money",GetPlay erMoney(playerid)); dUserSetINT(PlayerName(playerid)).("score",GetPlay erScore(playerid)); } PLAYERLIST_authed[playerid]=false; return 1; } public OnPlayerDisconnect(playerid, reason) { new pName[MAX_PLAYER_NAME]; new string[56]; GetPlayerName(playerid, pName, sizeof(pName)); switch(reason) { case 0: format(string, sizeof(string), "%s je napustio server. (Prekid veze)", pName); case 1: format(string, sizeof(string), "%s je napustio server. (Otisao)", pName); case 2: format(string, sizeof(string), "%s je napustio server. (Kikovan)", pName); } SendClientMessageToAll(0xAAAAAAAA, string); return 1; } |