Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help] Using dim's from Public Functions

[Help] Using dim's from Public Functions

Posts 1–5 of 5 · Page 1 of 1
apezwijn
apezwijn
[Help] Using dim's from Public Functions
Hey guys, I never really used this method, but by using this method I think my projects won't be messy anymore.

So ok, I have this public function:
Code:
Public Function GeneralDims()
        Dim dGame As Long
        Dim MobDeadState As Long
        Dim MobId As Long
        Dim cHP As Long
        Dim cMP As Long
        dGame = ReadDLL("Game.dll")
        MobDeadState = "&H" + Hex(dGame + &Hoffset)
        MobId = "&H" + Hex(dGame + &Hoffset)
        cHP = "&H" + Hex(dGame + &Hoffset)
        cMP = "&H" + Hex(dGame + &Hoffset)
        Return dGame & MobDeadState & MobId & cHP
    End Function
I just screwed around with the return, i'm not that good at creating functions:P

So what I want is, not having to dim and set a value to the var. all over again.

I want to use it like this:
Code:
Private Sub TimerTarget_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerTarget.Tick
        GeneralDims()
        If MobDeadState = 1 Then
'do somthing
end if
    End Sub
But now it just errors me that the var is not declared.

Could somebody help me?
Thanks,
Apez.

If want to be credited, say so, you will be credited.
#1 · 16y ago
Pixie
Pixie
I am an idiot, so I must ask this
What does this do first of all??
#2 · 16y ago
Hell_Demon
Hell_Demon
ever thought of moving your dims outside the function? o__O

Code:
Dim dGame As Long
Dim MobDeadState As Long
Dim MobId As Long
Dim cHP As Long
Dim cMP As Long
Public Function GeneralDims()
        dGame = ReadDLL("Game.dll")
        MobDeadState = "&H" + Hex(dGame + &Hoffset)
        MobId = "&H" + Hex(dGame + &Hoffset)
        cHP = "&H" + Hex(dGame + &Hoffset)
        cMP = "&H" + Hex(dGame + &Hoffset)
        Return dGame & MobDeadState & MobId & cHP
End Function
#3 · 16y ago
IA
Iamazn1
Arnt you like a godly coder?
On topic:
dont you need a Dim Var as ..... to get it to work?
When you get an error saying "blank is not declared.", it means its well, not declared.
#4 · 16y ago
apezwijn
apezwijn
Quote Originally Posted by Iamazn1 View Post
Arnt you like a godly coder?
On topic:
dont you need a Dim Var as ..... to get it to work?
When you get an error saying "blank is not declared.", it means its well, not declared.
lol, ya I already fixed it by putting them in global.
Ty all.

Close.
#5 · 16y ago
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

  • need help whit heal tool from admin menuBy Black666Devil666 in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    4Last post 15y ago
  • Help ! I get kicked from punkbusterBy DarkTiger in WarRock - International Hacks
    3Last post 19y ago
  • I hate people who use screen names from tv showsBy warlock78 in Flaming & Rage
    27Last post 17y ago
  • Help using hacksBy rigedw00t in Operation 7 General
    0Last post 17y ago
  • Help using haks plsBy mpghisawesome in General Hacking
    0Last post 17y ago

Tags for this Thread

#dim#functions#public