Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Unknown Gamemode

 
  • 0 Vote(s) - 0 Average
Pawn Unknown Gamemode
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#1
2021-03-18, 03:32 AM
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]
Stones
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: Dec 2020
Reputation: 0
Location: United Kingdom
#2
2021-03-18, 09:23 AM
Post a full log.
Virsenas
Offline

Burgershot Member
Posts: 47
Threads: 0
Joined: Feb 2021
Reputation: 6
#3
2021-03-18, 12:01 PM
Did you do anything with your objects? Did you edit them?
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#4
2021-03-18, 05:24 PM
Did you put it at the very top of your mode and recompile?
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#5
2021-03-18, 05:47 PM
(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]
destiezk
Offline

Burgershot Member
Posts: 41
Threads: 1
Joined: Feb 2021
Reputation: 3
Location: Hungary
#6
2021-03-18, 10:04 PM
(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.
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#7
2021-03-19, 11:04 AM
(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]
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#8
2021-03-19, 03:07 PM (This post was last modified: 2021-03-19, 03:23 PM by Radical.)
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.
Emmett
Offline

Burgershot Member
Posts: 7
Threads: 2
Joined: Apr 2020
Reputation: 0
Location: Belgrade, Serbia
#9
2021-03-19, 05:42 PM
(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:
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#10
2021-03-19, 06:33 PM
(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 plugin: jit
JIT plugin v2.0.2 is OK
.
Loaded.
Loading plugin: crashdetect
CrashDetect must be loaded before 
'jit'
Failed. 

PHP Code:
Server Plugins
--------------
Loading plugin: CrashDetect
CrashDetect plugin 4.20
Loaded
.
Loading plugin: jit
jit must be loaded before 
'CrashDetect'
Failed. 

https://github.com/Zeex/samp-plugin-jit/issues/32
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#11
2021-03-20, 01:45 PM
(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]
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#12
2021-03-20, 02:13 PM
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.
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#13
2021-03-20, 02:49 PM (This post was last modified: 2021-03-20, 03:04 PM by Snow.)
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]
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#14
2021-03-21, 12:11 PM
Well the solution is to fix the problem in the achievements code.
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#15
2021-03-21, 08:02 PM
(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]
Virsenas
Offline

Burgershot Member
Posts: 47
Threads: 0
Joined: Feb 2021
Reputation: 6
#16
2021-03-21, 08:17 PM (This post was last modified: 2021-03-21, 08:17 PM by Virsenas.)
(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?
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#17
2021-03-22, 05:24 AM
(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]
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode