views:

120

answers:

2

Hello guys, I'm stuck with some sort of error which i don't really understand in prolog. I get this error when calling a rule(which seems to work sometimes?) :

error(instantiation_error,Var0)

Can anyone explain to me what this means?

so i have two rules:

special(X) :- user(X, Days), Days >= 20.

special(X) :- premiumuser(X).

user(guy, 40).

although user is added dynamically sometimes it is not in the prolog db. I can elimited the first special(x) rule and the error goes.

when call call:

special(someone).

I get the error

Thanks

A: 

It means you have applied a functor which only works with atoms (e.g., <) to an uninstantiated variable. You need to post minimal code that demonstrates the problem before we can tell you any more.

Kilian Foth
added some info to the main post, thanks
KP65
A: 

managed to fix it

KP65
Positing your solution is advised so that users can, in the future, find it for their own use.
James Burgess