I've been getting an error with a script of mine that I can't seem to get rid of, here's the script:
And the error is "Variable defined without type", at line 22 that I'll highlight below.
#include "utility_h"
#include "events_h"
#include "global_objects_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_UNIQUE_POWER:
{
object oItem = GetEventObject(ev, 0);
string book = "specbook";
string name;
name = GetTag(OItem);
object oCaster = GetEventObject(ev, 1);
if (name == book) //this is where the "Variable not defined" error occurs.
{
SetCreatureProperty(oCaster, 38, 1.00);
}
break;
}
}
}
Weird Error with script "Variable defined without type"
Débuté par
Alexandus
, févr. 28 2010 10:12
#1
Posté 28 février 2010 - 10:12
#2
Posté 28 février 2010 - 10:24
The GetTag function has the wrong argument. It should be oItem instead of OItem.
#3
Posté 28 février 2010 - 10:27
*Facepalm* *Facepalm* *Facepalm* GAH! I knew it was something little like that!
Many thanks, you've saved me a lot of time and my computer from being stabbed with a pickaxe out of sheer frustration.
Many thanks, you've saved me a lot of time and my computer from being stabbed with a pickaxe out of sheer frustration.





Retour en haut






