Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Nameerror : name 'HOST' ist not defined

If you have a question or need help, this is the place to be.
Post Reply
Sonopanic
Posts: 22
Joined: Mon Dec 08, 2008 8:30 am

Nameerror : name 'HOST' ist not defined

Post by Sonopanic »

I want to define a variable

Put this in a script in autostart
HOST = '192.168.1.104'

But if i need the variable later, the error occurs.

Which neewbie mistake is this ?

Thanks
miljbee
Experienced User
Posts: 146
Joined: Fri Mar 27, 2009 1:29 pm
Location: Orl├®ans, France

Re: Nameerror : name 'HOST' ist not defined

Post by miljbee »

Use eg.globals.host instead of just host. Host is a local variable that only exists in the current context. eg.globals.whateveryouwant will enable you to store data that can be accessed anywhere in EG.
miljbee
TCP Events : A Better Network Event Sender/Receiver Plugin.
The Network Event Sender/Receiver in C#
Get events in EG from Google Calendar.
Sonopanic
Posts: 22
Joined: Mon Dec 08, 2008 8:30 am

Re: Nameerror : name 'HOST' ist not defined

Post by Sonopanic »

Thanks

it works
Post Reply