• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Unknown Gamemode
#1
My gamemode for some unknown reason fails to work. All plugins load, MySQL connection is successful, but number of vehicle models is 0 and the gamemode shows unknown in the client. Nativechecker fails to point out anything. However this mysterious thing might be the reason but I can't seem to fix it.

Code:
*** YSI Error: y_malloc with JIT requires "#define YSI_NO_HEAP_MALLOC"

*** YSI Warning: JIT disabled

[jit] Compilation was disabled





I tried putting?"#define YSI_NO_HEAP_MALLOC" in the script but this wont go anyway. What could be possibly wrong??
[Image: QIDa2vB.png]

  Reply
#2
Post a full log.
  Reply
#3
Did you do anything with your objects? Did you edit them?
  Reply
#4
Did you put it at the very top of your mode and recompile?
  Reply
#5
(2021-03-18, 05:24 PM)Y_Less Wrote: Did you put it at the very top of your mode and recompile?

Yes I just put it on top this time but still it'll show up in logs.



You can checkout the log here.?https://pastebin.com/NDnBdrZc



Here's the plugin line in server.cfg

Code:
plugins SKY mysql sscanf jit bcrypt-samp discord-connector streamer nativechecker
[Image: QIDa2vB.png]

  Reply
#6
(2021-03-18, 05:47 PM)Snow Wrote:
(2021-03-18, 05:24 PM)Y_Less Wrote: Did you put it at the very top of your mode and recompile?

Yes I just put it on top this time but still it'll show up in logs.



You can checkout the log here.?https://pastebin.com/NDnBdrZc



Here's the plugin line in server.cfg

Code:
plugins SKY mysql sscanf jit bcrypt-samp discord-connector streamer nativechecker



put .dll or .so after the plugin names and your issue should be fixed.
  Reply
#7
(2021-03-18, 10:04 PM)destiezk Wrote: put .dll or .so after the plugin names and your issue should be fixed.



No, Still same outcome.
[Image: QIDa2vB.png]

  Reply
#8
Use crashdetect plugin to see information and debug about GM not running.

But first you have to remove the JIT plugin because crashdetect and JIT plugin don't work together.



Or you can go back to previous versions of your game mode that didn't have this problem.

If you think the problem is with YSI 5 includes, go back to YSI 4.
  Reply
#9
(2021-03-19, 03:07 PM)Radical Wrote: Use crashdetect plugin to see information and debug about GM not running.

But first you have to remove the JIT plugin because crashdetect and JIT plugin don't work together.



Or you can go back to previous versions of your game mode that didn't have this problem.

If you think the problem is with YSI 5 includes, go back to YSI 4.



[Image: image.png]



[Image: image.png]



xd :thinking:
  Reply
#10
(2021-03-19, 05:42 PM)Emmett Wrote:
(2021-03-19, 03:07 PM)Radical Wrote: Use crashdetect plugin to see information and debug about GM not running.



But first you have to remove the JIT plugin because crashdetect and JIT plugin don't work together.







Or you can go back to previous versions of your game mode that didn't have this problem.



If you think the problem is with YSI 5 includes, go back to YSI 4.







[Image: image.png]







[Image: image.png]







xd :thinking:



But it happens to me:



PHP Code:
Server Plugins

--------------

Loading pluginjit

JIT plugin v2.0.2 is OK
.

Loaded.

Loading plugincrashdetect

CrashDetect must be loaded before 
'jit'

Failed



PHP Code:
Server Plugins

--------------

Loading pluginCrashDetect

CrashDetect plugin 4.20

Loaded
.

Loading pluginjit

jit must be loaded before 
'CrashDetect'

Failed



https://github.com/Zeex/samp-plugin-jit/issues/32
  Reply
#11
(2021-03-19, 03:07 PM)Radical Wrote: Use crashdetect plugin to see information and debug about GM not running.

But first you have to remove the JIT plugin because crashdetect and JIT plugin don't work together.



Or you can go back to previous versions of your game mode that didn't have this problem.

If you think the problem is with YSI 5 includes, go back to YSI 4.



No. Going back to YSI means tons of more complications and going back to old version of gamemode ain't a good idea either. I used crashdetect, you can see the log here.?https://pastebin.com/kRCQB4GX
[Image: QIDa2vB.png]

  Reply
#12
Quote:[18:43:28] [debug] Run time error 4: "Array index out of bounds"

[18:43:28] [debug] Attempted to read/write array element at index 25 in array of size 25

[18:43:28] [debug] AMX backtrace:

[18:43:28] [debug] #0 00058bfc in public CreateAchievement (33986792, 33986860, 1000) in uhf.amx

Gimme the CreateAchievement
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#13
Here's the original function from the include file
Code:
forward CreateAchievement(title[], info[], unlockvalue);
public CreateAchievement(title[], info[], unlockvalue)
{
    format(ACH_MAIN[ACH_NUM][ACH_TITLE], 32, "%s", title);
    format(ACH_MAIN[ACH_NUM][ACH_INFO], 128, "%s", info);
    ACH_MAIN[ACH_NUM][ACH_WINVALUES] = unlockvalue;

    if(ACH_NUM > MAX_ACHIEVEMENTS) printf("  **[WARNING] Number of achievements created is exceeding the max allowed limit.");

    return ACH_NUM, ACH_NUM;
}
Used in my gamemode like this
Code:
Ach_MoneyBag1 = CreateAchievement("GETTING RICH!","Find 1 Moneybag", 1);

EDIT: Removing all achievement code from the gamemode fixes the problem. But I want to know any possible solution to make both work with each other.
[Image: QIDa2vB.png]

  Reply
#14
Well the solution is to fix the problem in the achievements code.
  Reply
#15
(2021-03-21, 12:11 PM)Y_Less Wrote: Well the solution is to fix the problem in the achievements code.



Yes but I don't know what exactly is the problem here.
[Image: QIDa2vB.png]

  Reply
#16
(2021-03-21, 08:02 PM)Snow Wrote:
(2021-03-21, 12:11 PM)Y_Less Wrote: Well the solution is to fix the problem in the achievements code.

Yes but I don't know what exactly is the problem here.

Quote:[18:43:28] [debug] Run time error 4: "Array index out of bounds"
[18:43:28] [debug] Attempted to read/write array element at index 25 in array of size 25

It says it all here. Problem with the achievement array. What is the maximum number of achievements you can currently have in the server? There should be a define. What is ACH_NUM defined as? 25?
  Reply
#17
(2021-03-21, 08:17 PM)Virsenas Wrote: It says it all here. Problem with the achievement array. What is the maximum number of achievements you can currently have in the server? There should be a define. What is ACH_NUM defined as? 25?



Oh well yeah haha, forgot I had to change the max again. Thanks man!
[Image: QIDa2vB.png]

  Reply


Forum Jump: