Issue information

Issue ID
#7531
Status
Needs more Info
Severity
None
Started
jTynne
Jul 15, 2013 17:41
Last Post
Ind
Jul 21, 2013 19:01
Confirmation
N/A

jTynne - Jul 15, 2013 17:41

After an update to re779e4081e25f12acfa7fb05f0304caf9a89636, both getgroupid() and getgmlevel() seem to have stopped working.

dispbottom "group: "+getgroupid();
dispbottom "gmlvl: "+getgmlevel();

Both are giving me 0 as a value.

A VERY peculiar thing however, is that when I use either in an if statement such as the following:

if(getgmlevel() > 10) { goto L_gmskippy; }

It's making -everyone- regardless of account level/group ID go to that label in the code.

If it makes any difference, this is all within a PCLoginEvent NPC script.

This post has been edited by jTynne on Jul 15, 2013 17:45

Haru - Jul 15, 2013 22:00

Hmm, I can't reproduce the issue here:

I put the two lines you mentioned in an OnPCLoginEvent and @loadnpc-ed it, then logged out and back in:
[img]http://f.cl.ly/items/0B0y1R3R2U472J3Z213R/Screen%20Shot%202013-07-15%20at%2023.56.04.png[/img]

Can you check if you have the issue on a clean copy as well?

On a side note, commit e779e4081e25f12acfa7fb05f0304caf9a89636 doesn't seem to exist, is that a typo? (or a merge/commit ID from your own repository/branch?)

jTynne - Jul 16, 2013 4:28

re779e4081e25f12acfa7f2b05f0304caf9a89636

You forgot the r at the front, or I mistyped it. XD I just copy/pasted it from @version in-game. Sorry about that ^^

Strange that it's working for you D:

Gepard - Jul 16, 2013 10:04

[quote]

commit e779e4081e25f12acfa7f2b05f0304caf9a89636
[url="https://github.com/HerculesWS/Hercules/commit/e779e4081e25f12acfa7f2b05f0304caf9a89636"]https://github.com/HerculesWS/Hercules/commit/e779e4081e25f12acfa7f2b05f0304caf9a89636[/url]
Merge: aea8541 902a658
Author: Matheus Macabu <[email protected]>
Date: Fri Jul 12 09:27:11 2013 -0700

Merge pull request #57 from piotrhalaczkiewicz/master

Added cache folder to .gitignore.[/quote]

On a side note, "r" can not be a part of revision ID, it's a shortcut for "revision", used mainly in SVN or other CVS with linearly increasing revision numbers, like r12345. In Git, revisions (or commits) are usually refered to by it's SHA-1 hash,

Haru - Jul 16, 2013 16:20

Ah, alright, the hash you first posted was missing a '2' in the middle

I just doublechecked on that revision, and on a fresh copy of Hercules, and it's still working for me (both in pre-RE and RE mode.)

GM account:
[img]http://f.cl.ly/items/3q1s090E3G3t263O0S1i/Screen%20Shot%202013-07-16%20at%2018.18.29.png[/img]

Normal account:
[img]http://f.cl.ly/items/0O000I3d2o0Q111D3F0E/Screen%20Shot%202013-07-16%20at%2018.19.09.png[/img]

script:[code=auto:0] prontera,169,228,3 script Test::harutest 878,{ OnPCLoginEvent: dispbottom "group: "+getgroupid(); dispbottom "gmlvl: "+getgmlevel(); if(getgmlevel() > 10) { goto L_gmskippy; } dispbottom "Not a GM"; end; L_gmskippy: dispbottom "GM"; end; } [/code]

jTynne - Jul 17, 2013 2:15

That.. is very strange. Hrm. Going to update and see if anything changes. Thank you for looking into it, Haru!