Raised This Month: $51 Target: $400
 12% 

Rock, papper, scissors plugin error -> Run time error 5: memory access


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sykojb
Junior Member
Join Date: Nov 2020
Location: Romania
Old 11-29-2020 , 09:48   Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #1

Hello.
I decompiled an .amxx with lysis online (jailbreak .amxx) and this system returns error: "Run time error 5: memory access."

PHP Code:
public phf_start(tdIncoming[67], iTaskID)
{
    new 
id tdIncoming[0];
    new 
iPlayer tdIncoming[33];

    if (!
g_acceptphf[iPlayer])
    {
        static 
szName[32];
        
get_user_name(iPlayerszNamecharsmax(szName));
        
print_color(id".v[JB.B-ZONE.RO].g Jucatorul .v%s .gn-a acceptat PHF la timp!"szName);
        
g_phfinit[id] = 0;
        
g_phfinit[iPlayer] = 0;
        return 
PLUGIN_HANDLED;
    }

    
print_color(id".v[JB.B-ZONE.RO].g Aveti 5 secunde sa va alegeti semnul.");
    
print_color(iPlayer".v[JB.B-ZONE.RO].g Aveti 5 secunde sa va alegeti semnul.");

    
g_sign[id] = 0;
    
g_sign[iPlayer] = 0;

    
realmenu_phf(id);
    
realmenu_phf(iPlayer);

    new 
tdData[67];
    
tdData[0] = id;
    
tdData[33] = iPlayer;
    
tdData[66] = tdIncoming[66];

    
format(tdData[1], 31"%s"tdIncoming[1]);
    
format(tdData[34], 31"%s"tdIncoming[34]);

    
set_task(5.0"phf_finish"TASK_PHFSTOPtdData_"b");
    return 
PLUGIN_CONTINUE;

Line with error is "new id = tdIncoming[0];".
Please, help me. I don't understand where is the problem.
ps: sorry for my english.
sykojb is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-29-2020 , 12:51   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #2

Problem is in decompiling plugin
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
sykojb
Junior Member
Join Date: Nov 2020
Location: Romania
Old 11-29-2020 , 13:37   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #3

Quote:
Originally Posted by JocAnis View Post
Problem is in decompiling plugin
Ok, I know this.
How to fix?
sykojb is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-29-2020 , 13:39   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #4

Ask someone to code it from the start...or maybe there is already public version of it, i dont know
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
sykojb
Junior Member
Join Date: Nov 2020
Location: Romania
Old 11-29-2020 , 14:34   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #5

Quote:
Originally Posted by JocAnis View Post
Ask someone to code it from the start...or maybe there is already public version of it, i dont know
is complicated...
where can i find something like this?

Last edited by sykojb; 11-29-2020 at 14:35.
sykojb is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-29-2020 , 16:32   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #6

idk, try this: https://forums.alliedmods.net/showthread.php?t=220300
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 11-30-2020 , 17:57   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #7

Decompiling plugin WON'T give you the full code and you ll get lost throught it trying to understand how to replace the missing parts so i recomand to stop decompiling.
AnimalMonster is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-01-2020 , 02:01   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #8

The output of a decompiler should only be used as reference for complex logic that cannot easily be recreated. You'll need to have experience writing plugins to do this regardless.
__________________
fysiks is offline
sykojb
Junior Member
Join Date: Nov 2020
Location: Romania
Old 12-03-2020 , 15:59   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #9

Ok, ok, i understand.
but i have a new question for the next system (dice system).
how do i keep the sum (dice sum/amount)?

Last edited by sykojb; 12-04-2020 at 16:31.
sykojb is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 12-03-2020 , 16:39   Re: Rock, papper, scissors plugin error -> Run time error 5: memory access
Reply With Quote #10

u have to use nvault for saving. u have a lot of tutorials on this forum and extreamcs
lexzor is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode