Not sure how I'm getting "Cheater. You have been reported"

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
cubeblue
Cave Troll
Posts: 95
Joined: Tue Aug 05, 2008 12:50 pm
Location: Washington, DC

Not sure how I'm getting "Cheater. You have been reported"

Post by cubeblue »

I've been making my own frameworks for MapTool for years (none of them quite organized enough to release), but I've been away from it for months and my day-job coding stuff has made me forget a lot of the MT Script details. I'm sure there's something obvious I'm doing wrong, but here's the situation and a test campaign with minimal macros to illustrate the issue:

https://dl.dropboxusercontent.com/u/563 ... late.cmpgn

The Lib:main token just has three macros: onCampaignLoad, getGlobal, and message. message() works fine, but whenever I try to call getGlobal() from within message(), I get the cheating message. All of the macros on Lib:main are set so they cannot be edited by players. I'm not running a server when this happens. This happens if the test token is set as PC or NPC, assigned as owned by me or not.

Here's some screenshots to illustrate the code for each macro involved.

screenshots
Image
Image
Image
Image
This happens on my Mac running Java 8 and my Windows 7 PC running Java 8 (both 64-bit). I'm running MapTool 1.3.b91. Can provide more info as needed.

Anyone, off the top of their head know what's up?

Thanks
& So Forth a blog about dungeons & dragons & so forth. With a particular eye for virtual table-top play, 5e, and OSR themes.

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Not sure how I'm getting "Cheater. You have been reporte

Post by aliasmask »

When I check the string before being broadcast this is what I get:

Code: Select all

<table width='100%' style='font-family: verdana;' cellpadding='4'><tr><td style='background-color: #u001eu0001u0002argval = arg(0) = argval = arg(0)u001fcolor.ivoryu001ennu001eu0001u0002varValue = "" = varValue = ""u001fu001enu001eu0001u0002'' = ''u001fu001enu001eu0001u0002'' = ''u001fu001enu001eu0001u0002'' = ''u001fu001enu001eu0001u0002'' = ''u001fu001enu001eu0001u0002varValue = "ffffee" = varValue = "ffffee"u001fffffeeu001enu001eu0001u0002'' = ''u001fu001enu001eu0001u0002'' = ''u001fu001enu001eu0001u0002'' = ''u001fu001enu001eu0001u0002'' = ''u001fu001ennu001eu0001u0002macro.return = varValue = macro.return = ffffeeu001fffffeeu001e; color: #222222;' width='100%'>testing message.</td></tr></table>
You're probably getting the cheater message because of the arg(0) and macro.return bits of code, I'm guessing. In any case, you need to clean up your code. Instead of doing an abort you should define your functions with no output and make sure they return something with macro.return otherwise they return output generated by the code.

User avatar
cubeblue
Cave Troll
Posts: 95
Joined: Tue Aug 05, 2008 12:50 pm
Location: Washington, DC

Re: Not sure how I'm getting "Cheater. You have been reporte

Post by cubeblue »

If I have my maptool settings set to make all [] = [h: ], shouldn't that hide/prevent the output?

I'll play with it some more.

Thanks.
& So Forth a blog about dungeons & dragons & so forth. With a particular eye for virtual table-top play, 5e, and OSR themes.

User avatar
cubeblue
Cave Troll
Posts: 95
Joined: Tue Aug 05, 2008 12:50 pm
Location: Washington, DC

Re: Not sure how I'm getting "Cheater. You have been reporte

Post by cubeblue »

I manually changed all lines of code to use [h: instead of just [.
I removed the [abort(0)]. No change.

It looks like whenever I macro.return a value from a UDF on Lib:main I can't then pass that value to anything else without getting this "Cheater" message. Which is crazy, because I'm sure my older PF macros did this sort of thing all the time. Will load them up and see if I'm getting the same message or not.
& So Forth a blog about dungeons & dragons & so forth. With a particular eye for virtual table-top play, 5e, and OSR themes.

User avatar
cubeblue
Cave Troll
Posts: 95
Joined: Tue Aug 05, 2008 12:50 pm
Location: Washington, DC

Re: Not sure how I'm getting "Cheater. You have been reporte

Post by cubeblue »

I'm looking through my old macros, which still run fine. It looks like I never actually macro.return a value to a macro on a token. And so far it looks like the only macros I have that return values are returning them to trusted built-in functions within UDFs on a lib:token. Weird.
& So Forth a blog about dungeons & dragons & so forth. With a particular eye for virtual table-top play, 5e, and OSR themes.

User avatar
cubeblue
Cave Troll
Posts: 95
Joined: Tue Aug 05, 2008 12:50 pm
Location: Washington, DC

Re: Not sure how I'm getting "Cheater. You have been reporte

Post by cubeblue »

So, in case anyone else runs into this. I had to go back to my original notation to fix this. Basically everything gets wrapped in:

Code: Select all

<!-- 

-->
[abort(0)]
I do the abort(0) at the end to force no further output after the macro runs. All of my macro output is basically pushed via broadcast().
& So Forth a blog about dungeons & dragons & so forth. With a particular eye for virtual table-top play, 5e, and OSR themes.

Post Reply

Return to “MapTool”