03.05.2015, 21:39
[Include] YSI 4
03.05.2015, 22:10
How do i include this
03.05.2015, 23:30
04.05.2015, 01:06
I decided to update to YSI 4.0 and when i did i ran in to some problems while compiling
Line 1654
I just use y_commands and y_iterate
Код:
C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(229) : error 025: function heading differs from prototype C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1329) : error 021: symbol already defined: "@yH_OnScriptInit@003" C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1330) : error 021: symbol already defined: "@yH_OnScriptInit@003" C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1369) : warning 209: function "@yH_OnScriptInit@003" should return a value C:\Users\Win7\Desktop\Sa-mp 0.3.7\gamemodes\wip.pwn(1654) : error 025: function heading differs from prototype
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
04.05.2015, 04:11
Solve it with:
Код:
/* List of enum: // The majority of these are even - odd numbers return "1" not "0". COMMAND_ZERO_RET = 0 , // The command returned 0. COMMAND_OK = 1 , // Called corectly. COMMAND_UNDEFINED = 2 , // Command doesn't exist. COMMAND_DENIED = 3 , // Can't use the command. COMMAND_HIDDEN = 4 , // Can't use the command don't let them know it exists. COMMAND_NO_PLAYER = 6 , // Used by a player who shouldn't exist. COMMAND_DISABLED = 7 , // All commands are disabled for this player. COMMAND_BAD_PREFIX = 8 , // Used "/" instead of "#", or something similar. COMMAND_INVALID_INPUT = 10, // Didn't type "/something". */ public e_COMMAND_ERRORS:OnPlayerCommandPerformed(playerid, cmdtext[], e_COMMAND_ERRORS:success); { switch(success) { // case bla bla: /* Example: case COMMAND_DENIED: { Ban(playerid); // Ban them because using our secret command >_< lol } */ } return COMMAND_OK; }
Quote:
I decided to update to YSI 4.0 and when i did i ran in to some problems while compiling
Код:
C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(229) : error 025: function heading differs from prototype C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1329) : error 021: symbol already defined: "@yH_OnScriptInit@003" C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1330) : error 021: symbol already defined: "@yH_OnScriptInit@003" C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1369) : warning 209: function "@yH_OnScriptInit@003" should return a value C:\Users\Win7\Desktop\Sa-mp 0.3.7\gamemodes\wip.pwn(1654) : error 025: function heading differs from prototype pawn Код:
|
04.05.2015, 05:00
That fixed the function heading differs problem, but i still have this issue. I've done ****** searching and came up with the issue no where, just bring me back to my post
Код:
C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1329) : error 021: symbol already defined: "@yH_OnScriptInit@003" C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1330) : error 021: symbol already defined: "@yH_OnScriptInit@003" C:\Users\Win7\Desktop\sa-mp 0.3.7\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(1369) : warning 209: function "@yH_OnScriptInit@003" should return a value
04.05.2015, 08:04
Can i see your OnFilterScriptInit or OnGameModeInit?
04.05.2015, 08:08
(
Последний раз редактировалось ihatetn931; 04.05.2015 в 08:43.
)
pawn Код:
public OnGameModeInit()
{
#include "../gamemodes/RPG/objects.pwn"
#include "../gamemodes/RPG/buildings.pwn"
ManualVehicleEngineAndLights();
DisableInteriorEnterExits();
mysql_log(LOG_ERROR | LOG_WARNING,LOG_TYPE_HTML);
dbHandle = mysql_connect("127.0.0.1","username","database","password");
if(mysql_errno() != 0)
{
print("Mysql Failed\n");
}
else
{
print("Mysql Success\n");
}
UsePlayerPedAnims();
SetGameModeText("WIP");
SendRconCommand("mapname WIP");
//Timers
SetTimer("NitroReset", 3000, 1);
LoadAll();
printf("Bulldings Removed %d\n", CountRemovedObjects());
textDrawsGlobal();
WorldTime = SetTimer("UpdateWTime", 1000, true);
skinlist = LoadModelSelectionMenu("skins.txt");
vehiclelist = LoadModelSelectionMenu("vehicles.txt");
for(new v=0; v<MAX_VEHICLES; v++)
{
Vehicle_ReadPosition(v);
}
for(new i=0; i<GetMaxPlayers(); i++)
{
textDrawsPlayers(i);
}
return 1;
}
18.05.2015, 19:29
Thanks for re-post!
20.06.2015, 12:03
Don't use Iter_Remove within foreach loop! Use Iter_SafeRemove (in your code it would be
pawn Код:
Iter_SafeRemove(Jobs, i, i);
Quote:
<summary>Iter_SafeRemove</summary> <param name="iter">Name of the iterator to remove data from.</param> <param name="value">Data to remove.</param> <param name="next">Container for the pointer to the next element.</param> <returns> - </returns> <remarks> Wrapper for Iter_SafeRemoveInternal. Common use: Iter_SafeRemove(iter, i, i); native Iter_SafeRemove(Iterator:Name<>, value, &next); </remarks> |
20.06.2015, 12:05
Is it necessary if i'm breaking the loop just after removing the value from the iterator?
20.06.2015, 15:20
20.06.2015, 15:54
Quote:
Is it necessary if i'm breaking the loop just after removing the value from the iterator?
|
22.06.2015, 20:17
pawn Код:
CMD:removeallcars(playerid)
{
foreach (new i : Vehicle) DestroyVehicle(i);
SendClientMessage(playerid, 0xFFFFFFFF, "All vehicles destroyed!");
return 1;
}
23.06.2015, 02:44
Quote:
pawn Код:
|
pawn Код:
stock SafeDestroyVehicle(veh, Iterator:iter<>, &next)
{
if(IsValidVehicle(veh))
Iter_SafeRemove(iter, veh, next);
return DestroyVehicle(veh);
}
//USE:
foreach (new i : Vehicle) SafeDestroyVehicle(i, Vehicle, i);
24.06.2015, 09:25
When i try to use function Text_MessageBox i receive the following errors:
Line 272:
The whole function:
Код HTML:
Carabines.pwn(272) : error 017: undefined symbol "DEFAULT_TEXT_SET" Carabines.pwn(272) : error 017: undefined symbol "FIFTH_CHECKPOINT_DMV_DIALOG" Carabines.pwn(272) : error 029: invalid expression, assumed zero Carabines.pwn(272) : fatal error 107: too many error messages on one line
Quote:
Text_MessageBox(playerid, using inline OnDMVDialog, $DMV_DIALOG_TITLE, $FIFTH_CHECKPOINT_DMV_DIALOG, $DIALOGS_OK, $DIALOGS_CANCEL); |
Quote:
FUNCTION:SetPlayerDMVCheckpoint(playerid, CP) { if(CP < 16) { inline OnDMVDialog(pid, dialogid, response, listitem, string:inputtext[]) { // some code return 1; } //SetPlayerRaceCheckpointEx(playerid, 0,DMV_CHECKPOINT[CP][0], DMV_CHECKPOINT[CP][1], DMV_CHECKPOINT[CP][2], DMV_CHECKPOINT[CP+1][0], DMV_CHECKPOINT[CP+1][1], DMV_CHECKPOINT[CP+1][2], 5, CP); if(CP == 5) { Text_MessageBox(playerid, using inline OnDMVDialog, $DMV_DIALOG_TITLE, $FIFTH_CHECKPOINT_DMV_DIALOG, $DIALOGS_OK, $DIALOGS_CANCEL); } else if(CP == 10) Text_Send(playerid, $TENTH_CHECKPOINT_DMV); } else SetPlayerCheckpointEx(playerid, DMV_CHECKPOINT[CP][0], DMV_CHECKPOINT[CP][1], DMV_CHECKPOINT[CP][2], 5, CP); return 1; } |
26.06.2015, 16:29
Hello.
I'd like to follow up on this.
I'd like to follow up on this.
Quote:
Hi guys!
Seems like there is one more issue. In y_commands method Command_SetDeniedReturn() is not working. Trunk version. Код:
#include <YSI\y_commands> public OnPlayerConnect (playerid) { Command_SetDeniedReturn(false); return 1; } |
26.06.2015, 18:32
For people with issue like @andyandyy8 - I merged @PatchwerkQWER patch into upstream.
@ZZ: It seems it wasn't ported properly. Could you open an issue on github? I'll bring back the old verison when I read what happened recently with y_commands.
@All:
Currently I'm investigating https://github.com/Misiur/YSI-Includ...ment-115822235 this - y_malloc issue causes problems in inline functions, so mysql and dialogs are affected. If anybody can lend me a hand I'd really appreciate. When fixed I'll post here.
Also, is creating a release tag tarball with amx included a good idea?
@ZZ: It seems it wasn't ported properly. Could you open an issue on github? I'll bring back the old verison when I read what happened recently with y_commands.
@All:
Currently I'm investigating https://github.com/Misiur/YSI-Includ...ment-115822235 this - y_malloc issue causes problems in inline functions, so mysql and dialogs are affected. If anybody can lend me a hand I'd really appreciate. When fixed I'll post here.
Also, is creating a release tag tarball with amx included a good idea?
26.06.2015, 20:55
Fixed the memory problem, and pushed onto server. Might fix random hangups.
20.11.2016, 14:51
Help needed....
« Next Oldest | Next Newest »
Users browsing this thread: 9 Guest(s)